- 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>
-
- Apr 30, 2024
-
-
GCC Administrator authored
-
- Apr 29, 2024
-
-
Francois-Xavier Coudert authored
gcc/fortran/ChangeLog: * expr.cc (check_transformational): Add SELECTED_LOGICAL_KIND to allowed functions for Fortran 2023. * gfortran.h (GFC_ISYM_SL_KIND): New. * gfortran.texi: Mention SELECTED_LOGICAL_KIND. * intrinsic.cc (add_functions): Add SELECTED_LOGICAL_KIND. (gfc_intrinsic_func_interface): Allow it in initialization expressions. * intrinsic.h (gfc_simplify_selected_logical_kind): New proto. * intrinsic.texi: Add SELECTED_LOGICAL_KIND. * simplify.cc (gfc_simplify_selected_logical_kind): New function. * trans-decl.cc (gfc_build_intrinsic_function_decls): Initialize gfor_fndecl_sl_kind. * trans-intrinsic.cc (gfc_conv_intrinsic_sl_kind): New function. (gfc_conv_intrinsic_function): Call it for GFC_ISYM_SL_KIND. * trans.h (gfor_fndecl_sl_kind): New symbol. gcc/testsuite/ChangeLog: * gfortran.dg/selected_logical_kind_1.f90: New test. * gfortran.dg/selected_logical_kind_2.f90: New test. * gfortran.dg/selected_logical_kind_3.f90: New test. * gfortran.dg/selected_logical_kind_4.f90: New test. libgfortran/ChangeLog: * gfortran.map: Add _gfortran_selected_logical_kind. * intrinsics/selected_int_kind.f90: Add SELECTED_LOGICAL_KIND.
-
- Apr 13, 2024
-
-
GCC Administrator authored
-
- Apr 12, 2024
-
-
Ian McInerney authored
The fallback function (gf_vsnprintf) to provide a vsnprintf function if the system library doesn't have one would not compile due to the variable name for the string's destination buffer not being updated after the refactor in 2018 in edaaef60. This updates the internal logic of gf_vsnprintf to now use the str variable defined in the function signature. libgfortran/ChangeLog: 2024-04-04 Ian McInerney <i.mcinerney17@imperial.ac.uk> * runtime/error.c (gf_vsnprintf): Fix compilation Signed-off-by:
Ian McInerney <i.mcinerney17@imperial.ac.uk>
-
- Apr 09, 2024
-
-
GCC Administrator authored
-
- Apr 08, 2024
-
-
Tobias Burnus authored
This fixes a side-effect of/regression caused by r14-9822-g93adf88cc6744a, which was for the same PR. PR libfortran/114304 libgfortran/ChangeLog: * io/list_read.c (eat_separator): Accept tab as alternative to space. gcc/testsuite/ChangeLog: * gfortran.dg/pr114304-2.f90: New test.
-
GCC Administrator authored
-
- Apr 06, 2024
-
-
Jerry DeLisle authored
PR libfortran/114304 PR libfortran/105473 libgfortran/ChangeLog: * io/list_read.c (eat_separator): Add logic to handle spaces preceding a comma or semicolon such that that a 'null' read occurs without error at the end of comma or semicolon terminated input lines. Add check and error message for ';'. (list_formatted_read_scalar): Treat comma as a decimal point when specified by the decimal mode on the first item. gcc/testsuite/ChangeLog: * gfortran.dg/pr105473.f90: Modify to verify new error message. * gfortran.dg/pr114304.f90: New test.
-
- Apr 03, 2024
-
-
GCC Administrator authored
-
- Apr 02, 2024
-
-
Jakub Jelinek authored
Like in r12-7519-g027e30414492d50feb2854aff38227b14300dc4b, I've done git grep -v 'long long\|optab optab\|template template\|double double' | grep ' \([a-zA-Z]\+\) \1 ' This is just part of the changes, mostly for non-gcc directories. I'll try to get to the rest soon. Obviously, the above command also finds cases which are correct as is and shouldn't be changed, so one needs to manually inspect everything. I'd hope most of it is pretty obvious, but the config/ and libstdc++-v3/ hunks include a tweak in a license wording, though other copies of the similar license have the wording right. 2024-04-02 Jakub Jelinek <jakub@redhat.com> * Makefile.tpl: Fix duplicated words; returns returns -> returns. config/ * lcmessage.m4: Fix duplicated words; can can -> can, package package -> package. libdecnumber/ * decCommon.c (decFinalize): Fix duplicated words in comment; the the -> the. libgcc/ * unwind-dw2-fde.c (struct fde_accumulator): Fix duplicated words in comment; is is -> is. libgfortran/ * configure.host: Fix duplicated words; the the -> the. libgm2/ * configure.host: Fix duplicated words; the the -> the. libgomp/ * libgomp.texi (OpenMP 5.2): Fix duplicated words; with with -> with. (omp_target_associate_ptr): Fix duplicated words; either either -> either. (omp_init_allocator): Fix duplicated words; be be -> be. (omp_realloc): Fix duplicated words; is is -> is. (OMP_ALLOCATOR): Fix duplicated words; other other -> other. * priority_queue.h (priority_queue_multi_p): Fix duplicated words; to to -> to. libiberty/ * regex.c (byte_re_match_2_internal): Fix duplicated words in comment; next next -> next. * dyn-string.c (dyn_string_init): Fix duplicated words in comment; of of -> of. libitm/ * beginend.cc (GTM::gtm_thread::begin_transaction): Fix duplicated words in comment; not not -> not to. libobjc/ * init.c (duplicate_classes): Fix duplicated words in comment; in in -> in. * sendmsg.c (__objc_prepare_dtable_for_class): Fix duplicated words in comment; the the -> the. * encoding.c (objc_layout_structure): Likewise. libstdc++-v3/ * acinclude.m4: Fix duplicated words; file file -> file can. * configure.host: Fix duplicated words; the the -> the. libvtv/ * vtv_rts.cc (vtv_fail): Fix duplicated words; to to -> to. * vtv_fail.cc (vtv_fail): Likewise.
-
- Mar 27, 2024
-
-
GCC Administrator authored
-
Jerry DeLisle authored
PR libfortran/107031 libgfortran/ChangeLog: * io/file_pos.c (st_endfile): Remove call to next_record(). gcc/testsuite/ChangeLog: * gfortran.dg/endfile_5.f90: New test.
-
- Mar 12, 2024
-
-
GCC Administrator authored
-
- Mar 11, 2024
-
-
Jerry DeLisle authored
PR libfortran/105437 PR libfortran/114304 libgfortran/ChangeLog: * io/list_read.c (eat_separator): Remove check for decimal point mode and semicolon used as a seprator. Removes the regression. gcc/testsuite/ChangeLog: * gfortran.dg/pr105473.f90: Add additional checks to address the case of semicolon at the end of a line.
-
- Mar 08, 2024
-
-
GCC Administrator authored
-
- Mar 07, 2024
-
-
Jerry DeLisle authored
The previous patch used snprintf to set the message string. The message string is not a formatted string and the snprintf will interpret '%' related characters as format specifiers when there are no associated output variables. A segfault ensues. This change replaces snprintf with a fortran string copy function and null terminates the message string. PR libfortran/105456 libgfortran/ChangeLog: * io/list_read.c (list_formatted_read_scalar): Use fstrcpy from libgfortran/runtime/string.c to replace snprintf. (nml_read_obj): Likewise. * io/transfer.c (unformatted_read): Likewise. (unformatted_write): Likewise. (formatted_transfer_scalar_read): Likewise. (formatted_transfer_scalar_write): Likewise. * io/write.c (list_formatted_write_scalar): Likewise. (nml_write_obj): Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/pr105456.f90: Revise using '%' characters in users error message.
-
GCC Administrator authored
-
- Mar 06, 2024
-
-
Jerry DeLisle authored
The defines IOMSG_LEN and MSGLEN were redundant so these are combined into IOMSG_LEN as defined in io.h. The remainder of the patch adds checks for when a user defined derived type IO procedure sets the IOSTAT or IOMSG variables independent of the librrary defined I/O messages. PR libfortran/105456 libgfortran/ChangeLog: * io/io.h (IOMSG_LEN): Moved to here. * io/list_read.c (MSGLEN): Removed MSGLEN. (convert_integer): Changed MSGLEN to IOMSG_LEN. (parse_repeat): Likewise. (read_logical): Likewise. (read_integer): Likewise. (read_character): Likewise. (parse_real): Likewise. (read_complex): Likewise. (read_real): Likewise. (check_type): Likewise. (list_formatted_read_scalar): Adjust to IOMSG_LEN. (nml_read_obj): Add user defined error message. * io/transfer.c (unformatted_read): Add user defined error message. (unformatted_write): Add user defined error message. (formatted_transfer_scalar_read): Add user defined error message. (formatted_transfer_scalar_write): Add user defined error message. * io/write.c (list_formatted_write_scalar): Add user defined error message. (nml_write_obj): Add user defined error message. gcc/testsuite/ChangeLog: * gfortran.dg/pr105456-nmlr.f90: New test. * gfortran.dg/pr105456-nmlw.f90: New test. * gfortran.dg/pr105456-ruf.f90: New test. * gfortran.dg/pr105456-wf.f90: New test. * gfortran.dg/pr105456-wuf.f90: New test.
-
- Feb 26, 2024
-
-
GCC Administrator authored
-
- Feb 25, 2024
-
-
Jerry DeLisle authored
PR libfortran/105456 libgfortran/ChangeLog: * io/list_read.c (list_formatted_read_scalar): Add checks for the case where a user defines their own error codes and error messages and generate the runtime error. * io/transfer.c (st_read_done): Whitespace. gcc/testsuite/ChangeLog: * gfortran.dg/pr105456.f90: New test.
-
- Feb 18, 2024
-
-
GCC Administrator authored
-
- Feb 17, 2024
-
-
Jerry DeLisle authored
PR libfortran/105473 libgfortran/ChangeLog: * io/list_read.c (eat_separator): Reject comma as a seprator when it is being used as a decimal point. (parse_real): Reject a '.' when is should be a comma. (read_real): Likewise. * io/read.c (read_f): Add more checks for ',' and '.' conditions. gcc/testsuite/ChangeLog: * gfortran.dg/pr105473.f90: New test.
-