- Feb 05, 2025
-
-
GCC Administrator authored
-
- Feb 04, 2025
-
-
Thomas Koenig authored
gcc/fortran/ChangeLog: * arith.cc (arith_power): Handle modular arithmetic for BT_UNSIGNED. (eval_intrinsic): Error for unsigned exponentiation with -pedantic. * expr.cc (gfc_type_convert_binary): Use type of first argument for unsigned exponentiation. * gfortran.texi: Mention arithmetic exponentiation. * resolve.cc (resolve_operator): Allow unsigned exponentiation. * trans-decl.cc (gfc_build_intrinsic_function_decls): Build declarations for unsigned exponentiation. * trans-expr.cc (gfc_conv_cst_uint_power): New function. (gfc_conv_power_op): Call it. Handle unsigned exponentiation. * trans.h (gfor_fndecl_unsigned_pow_list): Add declaration. libgfortran/ChangeLog: * Makefile.am: Add files for unsigned exponentiation. * Makefile.in: Regenerate. * gfortran.map: Add functions for unsigned exponentiation. * generated/pow_m16_m1.c: New file. * generated/pow_m16_m16.c: New file. * generated/pow_m16_m2.c: New file. * generated/pow_m16_m4.c: New file. * generated/pow_m16_m8.c: New file. * generated/pow_m1_m1.c: New file. * generated/pow_m1_m16.c: New file. * generated/pow_m1_m2.c: New file. * generated/pow_m1_m4.c: New file. * generated/pow_m1_m8.c: New file. * generated/pow_m2_m1.c: New file. * generated/pow_m2_m16.c: New file. * generated/pow_m2_m2.c: New file. * generated/pow_m2_m4.c: New file. * generated/pow_m2_m8.c: New file. * generated/pow_m4_m1.c: New file. * generated/pow_m4_m16.c: New file. * generated/pow_m4_m2.c: New file. * generated/pow_m4_m4.c: New file. * generated/pow_m4_m8.c: New file. * generated/pow_m8_m1.c: New file. * generated/pow_m8_m16.c: New file. * generated/pow_m8_m2.c: New file. * generated/pow_m8_m4.c: New file. * generated/pow_m8_m8.c: New file. * m4/powu.m4: New file. gcc/testsuite/ChangeLog: * gfortran.dg/unsigned_15.f90: Adjust error messages. * gfortran.dg/unsigned_43.f90: New test. * gfortran.dg/unsigned_44.f90: New test.
-
- Jan 25, 2025
-
-
GCC Administrator authored
-
- Jan 24, 2025
-
-
Jerry DeLisle authored
This adjusts the source len for the case where the user has specified a field width with the A descriptor. PR libfortran/118571 libgfortran/ChangeLog: * io/write.c (write_utf8_char4): Adjust the src_len to the format width w_len when greater than zero. gcc/testsuite/ChangeLog: * gfortran.dg/utf8_3.f03: New test.
-
- Jan 18, 2025
-
-
GCC Administrator authored
-
- Jan 17, 2025
-
-
Harald Anlauf authored
PR libfortran/118536 libgfortran/ChangeLog: * io/transfer.c (formatted_transfer_scalar_write): Handle UNSIGNED in G formatting. gcc/testsuite/ChangeLog: * gfortran.dg/unsigned_write_2.f90: New test.
-
GCC Administrator authored
-
- Jan 16, 2025
-
-
Harald Anlauf authored
PR libfortran/118406 libgfortran/ChangeLog: * runtime/string.c (gfc_itoa): Handle unsigned integers larger than (10^19 * 2^64). gcc/testsuite/ChangeLog: * gfortran.dg/unsigned_write.f90: New test.
-
- Jan 02, 2025
-
-
Jakub Jelinek authored
-
Jakub Jelinek authored
Rotate ChangeLog files for ChangeLogs with yearly cadence. Also remove empty lines before Form Feed line.
-
- Dec 24, 2024
-
-
GCC Administrator authored
-
Hans-Peter Nilsson authored
Without this, after r15-6415-g586477d67bf2e3, you'll see, for targets where int32_t is a typedef of long int (beware of artificially broken lines): /x/gcc/libgfortran/caf/single.c: In function '_gfortran_caf_get_by_ct': /x/gcc/libgfortran/caf/single.c:2943:56: error: passing argument 2 of '\ (accessor_hash_table + (sizetype)((unsigned int)getter_index * 12))->ac\ cessor' from incompatible pointer type [-Wincompatible-pointer-types] 2943 | accessor_hash_table[getter_index].accessor (dst_ptr, &free_bu\ ffer, src_ptr, | ^~~~~~~~\ ~~~~ | | | int * /x/gcc/libgfortran/caf/single.c:2943:56: note: expected 'int32_t *' {ak\ a 'long int *'} but argument is of type 'int *' libgfortran: * caf/single.c (_gfortran_caf_get_by_ct): Correct type of free_buffer to int32_t.
-
- Dec 23, 2024
-
-
GCC Administrator authored
-
- Dec 22, 2024
-
-
Andre Vehreschild authored
Getting coarray data from remote images was slow, inefficient and did not work for object files that where not compiled with coarray support for derived types with allocatable/pointer components. The old approach emulated accessing data through a whole structure ref, which was error prone for corner cases. Furthermore was did it have a runtime complexity of O(N), where N is the number of allocatable/pointer components and descriptors involved. Each of those needed communication twice. The new approach creates a routine for each access into a coarray object putting all required operations there. Looking a tree-dump one will see those small routines. But this time it is just compiled fortran with all the knowledge of the compiler of bounds and so on. New paradigms will be available out of the box. Furthermore is the complexity of the communication reduced to be O(1). E.g. the mpi implementation sends one message for the parameters of the access and one message back with the results without caring about the number of allocatable/pointer/descriptor components in the access. Identification of access routines is done be adding them to a hash map, where the hash is the same on all images. Translating the hash to an index, which is the same on all images again, allows for fast calls of the access routines. Resolving the hash to an index is cached at runtime, preventing additional hash map lookups. A hashmap was use because not all processor OS combinations may use the same address for the access routine. gcc/fortran/ChangeLog: PR fortran/107635 * gfortran.h (gfc_add_caf_accessor): New function. * gfortran.texi: Document new API routines. * resolve.cc (get_arrayspec_from_expr): Synthesize the arrayspec resulting from an expression, i.e. not only the rank, but also the bounds. (remove_coarray_from_derived_type): Remove coarray ref from a derived type to access it in access routine. (convert_coarray_class_to_derived_type): Same but for classes. The result is a derived type. (split_expr_at_caf_ref): Split an expression at the coarray reference to move the reference after the coarray ref into the access routine. (check_add_new_component): Helper to add variables as components to derived type transfered to the access routine. (create_get_parameter_type): Create the derived type to transfer addressing data to the access routine. (create_get_callback): Create the access routine. (add_caf_get_intrinsic): Use access routine instead of old caf_get. * trans-decl.cc (gfc_build_builtin_function_decls): Register new API routines. (gfc_create_module_variable): Use renamed flag. (gfc_emit_parameter_debug_info): (struct caf_accessor): Linked list of hash-access routine pairs. (gfc_add_caf_accessor): Add a hash-access routine pair to above linked list. (create_caf_accessor_register): Add all registered hash-access routine pairs to the current caf_init. (generate_coarray_init): Use routine above. (gfc_generate_module_vars): Use renamed flag. (generate_local_decl): Same. (gfc_generate_function_code): Same. (gfc_process_block_locals): Same. * trans-intrinsic.cc (conv_shape_to_cst): Build the product of a shape. (gfc_conv_intrinsic_caf_get): Create call to access routine. (conv_caf_send): Adapt to caf_get using less arguments. (gfc_conv_intrinsic_function): Same. * trans.cc (gfc_trans_force_lval): Helper to ensure that an expression can be used as an lvalue-ref. * trans.h (gfc_trans_force_lval): See above. libgfortran/ChangeLog: * caf/libcaf.h (_gfortran_caf_register_accessor): New function to register access routines at runtime. (_gfortran_caf_register_accessors_finish): New function to finish registration of access routine and sort hash map. (_gfortran_caf_get_remote_function_index): New function to convert an hash to an index. (_gfortran_caf_get_by_ct): New function to get data from a remote image using the access routine given by an index. * caf/single.c (struct accessor_hash_t): Hashmap type. (_gfortran_caf_send): Fixed formatting. (_gfortran_caf_register_accessor): Register a hash accessor routine. (hash_compare): Compare two hashes for sort() and bsearch(). (_gfortran_caf_register_accessors_finish): Sort the hashmap to allow bsearch()'s quick lookup. (_gfortran_caf_get_remote_function_index): Map a hash to an index. (_gfortran_caf_get_by_ct): Get data from a remote image using the index provided by get_remote_function_index(). gcc/testsuite/ChangeLog: * gfortran.dg/coarray_atomic_5.f90: Adapted to look for get_by_ct. * gfortran.dg/coarray_lib_comm_1.f90: Same. * gfortran.dg/coarray_stat_function.f90: Same.
-
- Dec 21, 2024
-
-
GCC Administrator authored
-
- Dec 20, 2024
-
-
Andre Vehreschild authored
Caf_stop_numeric always exited with code 0, which is wrong. It shall behave like regular stop. Add reporting exceptions to caf's stop handlers. For this the existing library routine had to be exported. libgfortran/ChangeLog: PR fortran/57598 * caf/single.c (_gfortran_caf_stop_numeric): Report exceptions on stop. And fix send_by_ref. (_gfortran_caf_stop_str): Same. (_gfortran_caf_error_stop_str): Same. (_gfortran_caf_error_stop): Same. * gfortran.map: Add report_exception for export. * libgfortran.h (report_exception): Add to internal export. * runtime/stop.c (report_exception): Same.
-
- Dec 11, 2024
-
-
GCC Administrator authored
-
- Dec 10, 2024
-
-
Jerry DeLisle authored
PR fortran/117819 libgfortran/ChangeLog: * io/read.c (read_decimal): If the read value is short of the specified width and pad mode is PAD yes, check for BLANK ZERO and adjust the value accordingly. (read_decimal_unsigned): Likewise. (read_radix): Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/pr117819.f90: New test.
-
- Dec 05, 2024
-
-
GCC Administrator authored
-
- Dec 04, 2024
-
-
Jerry DeLisle authored
PR fortran/117820 libgfortran/ChangeLog: * io/write.c (write_b): Add test for zero needed by write_boz. gcc/testsuite/ChangeLog: * gfortran.dg/pr117820.f90: New test.
-
- Nov 24, 2024
-
-
GCC Administrator authored
-
- Nov 23, 2024
-
-
Jerry DeLisle authored
Standards require rejecting formats where descriptors are not separated by commas. This change allows this the missing comma to be accepted only with -std=legacy. PR fortran/88052 libgfortran/ChangeLog: * io/format.c (parse_format_list): Reject missing comma in format strings by default or if -std=f95 or higher. This is a runtime error. gcc/testsuite/ChangeLog: * gfortran.dg/comma_format_extension_4.f: Add missing comma. * gfortran.dg/dollar_edit_descriptor_2.f: Likewise. * gfortran.dg/fmt_error_9.f: Likewise. * gfortran.dg/fmt_g0_5.f08: Likewise. * gfortran.dg/fmt_t_2.f90: Likewise. * gfortran.dg/pr88052.f90: New test.
-
- Aug 21, 2024
-
-
GCC Administrator authored
-
- Aug 20, 2024
-
-
Andre Vehreschild authored
Fix ICE caused by converted expression already being pointer by checking for its type. Lift rewrite to caf_send completely into resolve and prevent more temporary arrays. PR fortran/84246 gcc/fortran/ChangeLog: * resolve.cc (caf_possible_reallocate): Detect arrays that may be reallocated by caf_send. (resolve_ordinary_assign): More reliably detect assignments where a rewrite to caf_send is needed. * trans-expr.cc (gfc_trans_assignment_1): Remove rewrite to caf_send, because this is done by resolve now. * trans-intrinsic.cc (conv_caf_send): Prevent unneeded temporary arrays. libgfortran/ChangeLog: * caf/single.c (send_by_ref): Created array's lbound is now 1 and the offset set correctly. gcc/testsuite/ChangeLog: * gfortran.dg/coarray_allocate_7.f08: Adapt to array being allocate by caf_send.
-
- Aug 19, 2024
-
-
GCC Administrator authored
-
- Aug 18, 2024
-
-
Sergey Fedorov authored
This allows to build and use IEEE modules on Darwin PowerPC. libgfortran/ChangeLog: * config/fpu-macppc.h (new file): initial support for powerpc-darwin. * configure.host: enable ieee_support for powerpc-darwin case, set fpu_host='fpu-macppc'. Signed-off-by:
Sergey Fedorov <vital.had@gmail.com>
-
- Jul 26, 2024
-
-
GCC Administrator authored
-
- Jul 25, 2024
-
-
Jerry DeLisle authored
PR libfortran/105361 libgfortran/ChangeLog: * io/list_read.c (finish_list_read): Add a condition check for a user defined derived type IO operation to avoid calling the EOF error. gcc/testsuite/ChangeLog: * gfortran.dg/pr105361.f90: New test.
-
- Jul 12, 2024
-
-
GCC Administrator authored
-
- Jul 11, 2024
-
-
Andre Vehreschild authored
Fortran: Fix rejecting class arrays of different ranks as storage association argument and add un/pack_class. [PR96992] Removing the assert in trans-expr, lead to initial strides not set which is now fixed. When the array needs repacking, this is done for class arrays now, too. Packing class arrays was done using the regular internal pack function in the past. But that does not use the vptr's copy function and breaks OOP paradigms (e.g. deep copy). The new un-/pack_class functions use the vptr's copy functionality to implement OOP paradigms correctly. PR fortran/96992 gcc/fortran/ChangeLog: * trans-array.cc (gfc_trans_array_bounds): Set a starting stride, when descriptor expects a variable for the stride. (gfc_trans_dummy_array_bias): Allow storage association for dummy class arrays, when they are not elemental. (gfc_conv_array_parameter): Add more general class support and packing for classes, too. * trans-array.h (gfc_conv_array_parameter): Add lbound shift for class arrays. * trans-decl.cc (gfc_build_builtin_function_decls): Add decls for internal_un-/pack_class. * trans-expr.cc (gfc_reset_vptr): Allow supplying a type-tree to generate the vtab from. (gfc_class_set_vptr): Allow supplying a class-tree to take the vptr from. (class_array_data_assign): Rename to gfc_class_array_data_assign and make usable from other compile units. (gfc_class_array_data_assign): Renamed from class_array_data_ assign. (gfc_conv_derived_to_class): Remove assert to allow converting derived to class type arrays with assumed rank. Reduce code base and use gfc_conv_array_parameter also for classes. (gfc_conv_class_to_class): Use gfc_class_data_assign. (gfc_conv_procedure_call): Adapt to new signature of gfc_conv_derived_to_class. * trans-io.cc (transfer_expr): Same. * trans-stmt.cc (trans_associate_var): Same. * trans.h (gfc_conv_derived_to_class): Signature changed. (gfc_class_array_data_assign): Made public. (gfor_fndecl_in_pack_class): Added declaration. (gfor_fndecl_in_unpack_class): Same. libgfortran/ChangeLog: * Makefile.am: Add in_un-/pack_class.c to build. * Makefile.in: Regenerated from Makefile.am. * gfortran.map: Added new functions and bumped ABI. * libgfortran.h (GFC_CLASS_T): Added for generating class representation at runtime. * runtime/in_pack_class.c: New file. * runtime/in_unpack_class.c: New file. gcc/testsuite/ChangeLog: * gfortran.dg/class_dummy_11.f90: New test.
-
- Jun 07, 2024
-
-
GCC Administrator authored
-
- Jun 06, 2024
-
-
Thomas Schwinge authored
..., in order to enable (portions of) Fortran I/O, for example. libgfortran/ * configure.ac: No longer set 'LIBGFOR_MINIMAL' for nvptx. * configure: Regenerate. libgomp/ * libgomp.texi (nvptx): Update. * testsuite/libgomp.fortran/target-print-1-nvptx.f90: Remove. * testsuite/libgomp.fortran/target-print-1.f90: Adjust. * testsuite/libgomp.oacc-fortran/error_stop-2-nvptx.f: New. * testsuite/libgomp.oacc-fortran/error_stop-2.f: Adjust. * testsuite/libgomp.oacc-fortran/print-1-nvptx.f90: Adjust. * testsuite/libgomp.oacc-fortran/print-1.f90: Adjust. * testsuite/libgomp.oacc-fortran/stop-2-nvptx.f: New. * testsuite/libgomp.oacc-fortran/stop-2.f: Adjust. Co-authored-by:
Andrew Stubbs <ams@gcc.gnu.org>
-
Thomas Schwinge authored
PR target/85463 libgfortran/ * runtime/minimal.c [__nvptx__] (exit): Don't override. libgomp/ * config/nvptx/error.c (exit): Don't override. * testsuite/libgomp.oacc-fortran/error_stop-1.f: Update. * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise. * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise. * testsuite/libgomp.oacc-fortran/stop-1.f: Likewise. * testsuite/libgomp.oacc-fortran/stop-2.f: Likewise. * testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.
-
- May 09, 2024
-
-
GCC Administrator authored
-
- May 07, 2024
-
-
Rainer Orth authored
The recent move of libgfortran object files to subdirs and the resulting breakage of libgfortran.so symbol exports demonstrated how fragile deriving object and archive names from their libtool counterparts in the Makefiles is. Therefore, this patch moves that step into make_sunver.pl, considerably simplifying the Makefile rules to create the version scripts. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11, verifying that the version scripts are identical except for the input filenames. 2024-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> contrib: * make_sunver.pl: Use File::Basename; Skip -lLIB args. Convert libtool object/archive names to underlying objects/archives. libatomic: * Makefile.am [LIBAT_BUILD_VERSIONED_SHLIB_SUN] (libatomic.map-sun): Pass $(libatomic_la_OBJECTS), $(libatomic_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libffi: * Makefile.am [LIBFFI_BUILD_VERSIONED_SHLIB_SUN] (libffi.map-sun): Pass $(libffi_la_OBJECTS), $(libffi_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libgfortran: * Makefile.am [LIBGFOR_USE_SYMVER_SUN} (gfortran.ver-sun): Pass $(libgfortran_la_OBJECTS), $(libgfortran_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libgomp: * Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN] (libgomp.ver-sun): Pass $(libgomp_la_OBJECTS), $(libgomp_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libitm: * Makefile.am [LIBITM_BUILD_VERSIONED_SHLIB_SUN] (libitm.map-sun): Pass $(libitm_la_OBJECTS), $(libitm_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libquadmath: * Makefile.am [LIBQUAD_USE_SYMVER_SUN] (quadmath.map-sun): Pass $(libquadmath_la_OBJECTS), $(libquadmath_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libssp: * Makefile.am [LIBSSP_USE_SYMVER_SUN] (ssp.map-sun): Pass $(libssp_la_OBJECTS), $(libssp_la_LIBADD) to make_sunver.pl unmodified. * Makefile.in: Regenerate. libstdc++-v3: * src/Makefile.am [ENABLE_SYMVERS_SUN] (libstdc++-symbols.ver-sun): Pass $(libstdc___la_OBJECTS), $(libstdc___la_LIBADD) to make_sunver.pl unmodified. * src/Makefile.in: Regenerate.
-
GCC Administrator authored
-
- May 06, 2024
-
-
David Edelsohn authored
With the change in subdirectories, the code for libgfortran fat libraries needs to be adjusted to explicitly reference the subdirectory. AIX creates fat library archives and the compiler itself can be built as either 32 bit or 64 bit application and default code generation. For the two, alternate versions of the compiler to interoperate, GCC needs to construct the fat libraries manually. The Makefile fragment had been trying to leverage as much of the existing targets and macros as possible. With the subdirectory change, the location of single.o is more obscured and cannot be determined without libtool. This patch references the location of the real object file more explicitly. Utilizing subst seems like overkill and unnecessary obscuration for a single object file. Either way, it's digging below the libtool abstraction layer. This also fixes Fortran bootstrap on AIX. Bootstrapped on powerpc-ibm-aix7.3.0.0 libgfortran/ChangeLog: * config/t-aix (all-local, libcaf_single): Explicitly reference caf/.libs/single.o Signed-off-by:
David Edelsohn <dje.gcc@gmail.com>
-
Rainer Orth authored
The move of libgfortran objects to subdirectories completely broke the creation of libgfortran.so on Solaris. Since the gfortran.ver-sun rule doesn't support that structure, no libtool objects are found, thus no symbols exported from libgfortran.so, causing every link to fail. This patch fixes this by allowing for the new structure. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-05-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> libgfortran: * Makefile.am [LIBGFOR_USE_SYMVER_SUN] (gfortran.ver-sun): Handle objects in subdirs. * Makefile.in: Regenerate.
-
- May 03, 2024
-
-
GCC Administrator authored
-
- May 02, 2024
-
-
Francois-Xavier Coudert authored
This means using sub-dirs and amending some of the recipes accordingly. libgfortran/ChangeLog: * Makefile.am: Use sub-dirs, amend recipies accordingly. * Makefile.in: Regenerate. Signed-off-by:
Iain Sandoe <iain@sandoe.co.uk>
-