aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
AgeCommit message (Collapse)AuthorFilesLines
2024-07-19Update ChangeLog and version files for releasereleases/gcc-11.5.0releases/gcc-11Richard Biener1-0/+4
2024-02-12Daily bump.GCC Administrator1-0/+5
2024-02-11libgfortran: avoid duplicate libraries in specFrancois-Xavier Coudert1-1/+1
The linking of libgcc is already present in %(liborig), so the current situation duplicates libraries. This was not an issue until macOS's new linker started giving warnings for such cases. libgfortran/ChangeLog: PR libfortran/110651 * libgfortran.spec.in: Remove duplicate libraries.
2023-05-29Update ChangeLog and version files for releasereleases/gcc-11.4.0Jakub Jelinek1-0/+4
2022-04-21Update ChangeLog and version files for releasereleases/gcc-11.3.0Richard Biener1-0/+4
2021-12-20Daily bump.GCC Administrator1-0/+10
2021-12-19Fortran: PACK intrinsic should not try to read from zero-sized arrayHarald Anlauf1-0/+9
libgfortran/ChangeLog: PR libfortran/103634 * intrinsics/pack_generic.c (pack_internal): Handle case when the array argument of PACK has one or more extents of size zero to avoid invalid reads. gcc/testsuite/ChangeLog: PR libfortran/103634 * gfortran.dg/intrinsic_pack_6.f90: New test. (cherry picked from commit 1c613165a55b212c59a83796b20a1d555e096504)
2021-07-28Update ChangeLog and version files for releasereleases/gcc-11.2.0Richard Biener1-0/+4
2021-06-25Daily bump.GCC Administrator1-0/+7
2021-06-23Fortran: fix sm computation in CFI_allocate [PR93524]Sandra Loosemore1-4/+1
Backported from trunk. This patch fixes a bug in setting the step multiplier field in the C descriptor for array dimensions > 2. 2021-06-21 Sandra Loosemore <sandra@codesourcery.com> Tobias Burnus <tobias@codesourcery.com> libgfortran/ PR fortran/93524 * runtime/ISO_Fortran_binding.c (CFI_allocate): Fix sm computation. gcc/testsuite/ PR fortran/93524 * gfortran.dg/pr93524.c: New. * gfortran.dg/pr93524.f90: New.
2021-06-07Daily bump.GCC Administrator1-0/+9
2021-06-06PR fortran/98301 - random_init() is brokenAndre Vehreschild4-54/+77
Correct implementation of random_init() when -fcoarray=lib is given. Backport from mainline. 2021-06-06 Andre Vehreschild <vehre@gcc.gnu.org> Steve Kargl <kargl@gcc.gnu.org> gcc/fortran/ChangeLog: PR fortran/98301 * trans-decl.c (gfc_build_builtin_function_decls): Move decl. * trans-intrinsic.c (conv_intrinsic_random_init): Use bool for lib-call of caf_random_init instead of logical (4-byte). * trans.h: Add tree var for random_init. libgfortran/ChangeLog: PR fortran/98301 * caf/libcaf.h (_gfortran_caf_random_init): New function. * caf/single.c (_gfortran_caf_random_init): New function. * gfortran.map: Added fndecl. * intrinsics/random_init.f90: Implement random_init.
2021-05-04Daily bump.GCC Administrator1-0/+12
2021-05-03Fortran: Async I/O - avoid unlocked unlocking [PR100352]Tobias Burnus3-10/+12
Follow up to PR100352, which moved unit unlocking to st_*_done_worker to avoid lock order reversal; however, as async_io uses a different lock, the (unlocked locked) unit lock shall not be unlocked there. libgfortran/ChangeLog: PR libgomp/100352 * io/transfer.c (st_read_done_worker, st_write_done_worker): Add new arg whether to unlock unit. (st_read_done, st_write_done): Call it with true. * io/async.c (async_io): Call it with false. * io/io.h (st_write_done_worker, st_read_done_worker): Update prototype. (cherry picked from commit a13a50047ef1814a7bda2392f728bf28f81b17ce)
2021-04-27Update ChangeLog and version files for releaseJakub Jelinek1-0/+4
2021-03-13Daily bump.GCC Administrator1-0/+9
2021-03-12Fortran: Fix libgfortran I/O race with newunit_free [PR99529]Tobias Burnus2-9/+24
libgfortran/ChangeLog: * io/transfer.c (st_read_done_worker, st_write_done_worker): Call unlock_unit here, add unit_lock lock around newunit_free call. (st_read_done, st_write_done): Only call unlock_unit when not calling the worker function. * io/unit.c (set_internal_unit): Don't reset the unit_number to the same number as this cause race warnings.
2021-03-06Daily bump.GCC Administrator1-0/+31
2021-03-05PR libfortran/99218 - matmul on temporary array accesses invalid memoryHarald Anlauf27-92/+184
Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1. libgfortran/ChangeLog: PR libfortran/99218 * m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1. * generated/matmul_c10.c: Regenerated. * generated/matmul_c16.c: Likewise. * generated/matmul_c4.c: Likewise. * generated/matmul_c8.c: Likewise. * generated/matmul_i1.c: Likewise. * generated/matmul_i16.c: Likewise. * generated/matmul_i2.c: Likewise. * generated/matmul_i4.c: Likewise. * generated/matmul_i8.c: Likewise. * generated/matmul_r10.c: Likewise. * generated/matmul_r16.c: Likewise. * generated/matmul_r4.c: Likewise. * generated/matmul_r8.c: Likewise. * generated/matmulavx128_c10.c: Likewise. * generated/matmulavx128_c16.c: Likewise. * generated/matmulavx128_c4.c: Likewise. * generated/matmulavx128_c8.c: Likewise. * generated/matmulavx128_i1.c: Likewise. * generated/matmulavx128_i16.c: Likewise. * generated/matmulavx128_i2.c: Likewise. * generated/matmulavx128_i4.c: Likewise. * generated/matmulavx128_i8.c: Likewise. * generated/matmulavx128_r10.c: Likewise. * generated/matmulavx128_r16.c: Likewise. * generated/matmulavx128_r4.c: Likewise. * generated/matmulavx128_r8.c: Likewise. gcc/testsuite/ChangeLog: PR libfortran/99218 * gfortran.dg/matmul_21.f90: New test.
2021-03-04Daily bump.GCC Administrator1-0/+7
2021-03-03libgfortran: Fix negation for largest integer [PR81986]Tobias Burnus1-1/+1
libgfortran/ChangeLog: 2021-03-01 Vittorio Zecca <zeccav@gmail.com> Tobias Burnus <tobias@codesourcery.com> PR libfortran/81986 * runtime/string.c (gfc_itoa): Cast to unsigned before negating.
2021-02-13Daily bump.GCC Administrator1-0/+6
2021-02-12libgfortran: Fix PR95647 by changing the interfaces of operators .eq. and .ne.Steve Kargl1-4/+5
The FE converts the old school .eq. to ==, and then tracks the ==. The module starts with == and so it does not properly overload the .eq. Reversing the interfaces fixes this. 2021-02-12 Steve Kargl <sgk@troutmask.apl.washington.edu> libgfortran/ChangeLog: PR libfortran/95647 * ieee/ieee_arithmetic.F90: Flip interfaces of operators .eq. to == and .ne. to /= . gcc/testsuite/ChangeLog: PR libfortran/95647 * gfortran.dg/ieee/ieee_12.f90: New test.
2021-02-12Daily bump.GCC Administrator1-0/+6
2021-02-10libgfortran: Fix unwanted end-of-record by checking if seen_dollar.Jerry DeLisle1-0/+2
libgfortran/ChangeLog: PR libfortran/98825 * io/transfer.c (next_record_w): Insert check for seen_dollar and if so, skip issueing next record. gcc/testsuite/ChangeLog: PR libfortran/98825 * gfortran.dg/dollar_edit_descriptor_4.f: New test.
2021-01-28Daily bump.GCC Administrator1-0/+5
2021-01-27Fix strides for C descriptors with stride > 2.Harris Snyder1-1/+6
libgfortran/ChangeLog: * runtime/ISO_Fortran_binding.c (CFI_establish): fixed strides for rank >2 arrays. gcc/testsuite/ChangeLog: * gfortran.dg/ISO_Fortran_binding_18.c: New test. * gfortran.dg/ISO_Fortran_binding_18.f90: New test.
2021-01-17Fix ChangeLog entries.Jerry DeLisle1-1/+1
2021-01-16Daily bump.GCC Administrator1-0/+6
2021-01-15fortran: Fixes a bug in ISO_Fortran_binding.c.Jerry DeLisle1-2/+1
libgfortran/ChangeLog: * runtime/ISO_Fortran_binding.c (CFI_establish): Fixed signed char arrays. Signed char or uint8_t arrays would cause crashes unless an element size is specified. gcc/testsuite/ChangeLog: * gfortran.dg/iso_fortran_binding_uint8_array.f90: New test. * gfortran.dg/iso_fortran_binding_uint8_array_driver.c: New test.
2021-01-06Daily bump.GCC Administrator1-0/+4
2021-01-05Update GNU/Hurd configure supportSamuel Thibault1-11/+1
ChangeLog: * libtool.m4: Match gnu* along other GNU systems. * libgo/config/libtool.m4: Match gnu* along other GNU systems. * libgo/configure: Re-generate. libffi/ * configure: Re-generate. libgomp/ * configure: Re-generate. gcc/ * configure: Re-generate. libatomic/ * configure: Re-generate. libbacktrace/ * configure: Re-generate. libcc1/ * configure: Re-generate. libgfortran/ * configure: Re-generate. libgomp/ * configure: Re-generate. libhsail-rt/ * configure: Re-generate. libitm/ * configure: Re-generate. libobjc/ * configure: Re-generate. liboffloadmic/ * configure: Re-generate. * plugin/configure: Re-generate. libphobos/ * configure: Re-generate. libquadmath/ * configure: Re-generate. libsanitizer/ * configure: Re-generate. libssp/ * configure: Re-generate. libstdc++-v3/ * configure: Re-generate. libvtv/ * configure: Re-generate. lto-plugin/ * configure: Re-generate. zlib/ * configure: Re-generate.
2021-01-04Update copyright years.Jakub Jelinek779-779/+779
2021-01-02Daily bump.GCC Administrator1-0/+4
2021-01-01Rotate ChangeLog files - step 2 - remove 2020 entries from ChangeLog files.Jakub Jelinek1-386/+1
Can't be committed together with the previous one due to the ChangeLog vs. other files restrictions.
2021-01-01Rotate ChangeLog files - part 1 - add ChangeLog-2020.Jakub Jelinek1-0/+391
2021-01-01 Jakub Jelinek <jakub@redhat.com> gcc/ * ChangeLog-2020: Rotate ChangeLog. New file. gcc/ada/ * ChangeLog-2020: Rotate ChangeLog. New file. gcc/cp/ * ChangeLog-2020: Rotate ChangeLog. New file. gcc/d/ * ChangeLog-2020: Rotate ChangeLog. New file. gcc/fortran/ * ChangeLog-2020: Rotate ChangeLog. New file. gcc/testsuite/ * ChangeLog-2020: Rotate ChangeLog. New file. libgfortran/ * ChangeLog-2020: Rotate ChangeLog. New file. libstdc++-v3/ * ChangeLog-2020: Rotate ChangeLog. New file.
2020-12-06Daily bump.GCC Administrator1-0/+5
2020-12-05Darwin : Update libtool and dependencies for Darwin20 [PR97865]Iain Sandoe1-16/+18
The change in major version (and the increment from Darwin19 to 20) caused libtool tests to fail which resulted in incorrect build settings for shared libraries. We take this opportunity to sort out the shared undefined symbols state rather than propagating the current unsound behaviour into a new rev. This change means that we default to the case that missing symbols are considered an error, and if one wants to allow this intentionally, the confiuration for that case should be set appropriately. Three existing cases need undefined dynamic lookup: libitm, where there is already a configuration mechanism to add the flags. libcc1, where we add simple configuration to add the flags for Darwin. libsanitizer, where we can add to the existing extra flags. libcc1/ChangeLog: PR target/97865 * Makefile.am: Add dynamic_lookup to LD flags for Darwin. * configure.ac: Test for Darwin host and set a flag. * Makefile.in: Regenerate. * configure: Regenerate. libitm/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin. * configure: Regenerate. libsanitizer/ChangeLog: PR target/97865 * configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for Darwin. * configure: Regenerate. ChangeLog: PR target/97865 * libtool.m4: Update handling of Darwin platform link flags for Darwin20. gcc/ChangeLog: PR target/97865 * configure: Regenerate. libatomic/ChangeLog: PR target/97865 * configure: Regenerate. libbacktrace/ChangeLog: PR target/97865 * configure: Regenerate. libffi/ChangeLog: PR target/97865 * configure: Regenerate. libgfortran/ChangeLog: PR target/97865 * configure: Regenerate. libgomp/ChangeLog: PR target/97865 * configure: Regenerate. libhsail-rt/ChangeLog: PR target/97865 * configure: Regenerate. libobjc/ChangeLog: PR target/97865 * configure: Regenerate. libphobos/ChangeLog: PR target/97865 * configure: Regenerate. libquadmath/ChangeLog: PR target/97865 * configure: Regenerate. libssp/ChangeLog: PR target/97865 * configure: Regenerate. libstdc++-v3/ChangeLog: PR target/97865 * configure: Regenerate. libvtv/ChangeLog: PR target/97865 * configure: Regenerate. zlib/ChangeLog: PR target/97865 * configure: Regenerate.
2020-11-30Daily bump.GCC Administrator1-0/+4
2020-11-29Fix hppa64-hpux11 build to remove source paths from embedded path.John David Anglin1-4/+4
This change adds the +nodefaultrpath ld option to remove all library paths that were specified with the -L option from the embedded path. 2020-11-29 John David Anglin <danglin@gcc.gnu.org> ChangeLog: * libtool.m4 (archive_cmds): Add +nodefaultrpath ld option on hppa64-*-hpux11*. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libhsail-rt/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. liboffloadmic/ChangeLog: * configure: Regenerate. * plugin/configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2020-11-27Daily bump.GCC Administrator1-0/+22
2020-11-26libgfortran: Verify the presence of all functions for POSIX 2008 localeMaciej W. Rozycki4-9/+13
While we have `configure' checks for the individual POSIX 2008 extended locale functions we refer to and use to guard the respective call sites, we only verify the presence of `newlocale' for our global feature enable check. Consequently compilation fails for targets like NetBSD that only have partial support for POSIX 2008 locale features and in particular lack the `uselocale' function: .../libgfortran/io/transfer.c: In function 'data_transfer_init_worker': .../libgfortran/io/transfer.c:3416:30: error: 'old_locale_lock' undeclared (first use in this function) 3416 | __gthread_mutex_lock (&old_locale_lock); | ^~~~~~~~~~~~~~~ .../libgfortran/io/transfer.c:3416:30: note: each undeclared identifier is reported only once for each function it appears in .../libgfortran/io/transfer.c:3417:12: error: 'old_locale_ctr' undeclared (first use in this function) 3417 | if (!old_locale_ctr++) | ^~~~~~~~~~~~~~ .../libgfortran/io/transfer.c:3419:11: error: 'old_locale' undeclared (first use in this function); did you mean 'c_locale'? 3419 | old_locale = setlocale (LC_NUMERIC, NULL); | ^~~~~~~~~~ | c_locale .../libgfortran/io/transfer.c: In function 'finalize_transfer': .../libgfortran/io/transfer.c:4253:26: error: 'old_locale_lock' undeclared (first use in this function) 4253 | __gthread_mutex_lock (&old_locale_lock); | ^~~~~~~~~~~~~~~ .../libgfortran/io/transfer.c:4254:10: error: 'old_locale_ctr' undeclared (first use in this function) 4254 | if (!--old_locale_ctr) | ^~~~~~~~~~~~~~ .../libgfortran/io/transfer.c:4256:30: error: 'old_locale' undeclared (first use in this function); did you mean 'c_locale'? 4256 | setlocale (LC_NUMERIC, old_locale); | ^~~~~~~~~~ | c_locale make[3]: *** [Makefile:6221: transfer.lo] Error 1 Only enable the use of POSIX 2008 extended locale features then when all the three functions required are present, removing said build errors. libgfortran/ * io/io.h [HAVE_NEWLOCALE]: Also check for HAVE_FREELOCALE and HAVE_USELOCALE. [HAVE_FREELOCALE && HAVE_NEWLOCALE && HAVE_USELOCALE] (HAVE_POSIX_2008_LOCALE): New macro. (st_parameter_dt) [HAVE_NEWLOCALE]: Check for HAVE_POSIX_2008_LOCALE instead. * io/transfer.c (data_transfer_init_worker, finalize_transfer) [HAVE_USELOCALE]: Check for HAVE_POSIX_2008_LOCALE instead. * io/unit.c [HAVE_NEWLOCALE]: Likewise. (init_units) [HAVE_NEWLOCALE]: Likewise. (close_units) [HAVE_FREELOCALE]: Likewise. * runtime/error.c (gf_strerror) [HAVE_USELOCALE]: Likewise.
2020-11-26libgfortran: Correct FP feature macro checksMaciej W. Rozycki1-6/+6
The *_HAS_* floating-point feature macros are defined as 0/1 rather than #undef/#define settings by gcc/c-family/c-cppbuiltin.c. Consequently we choose to use infinity and NaN features even with non-IEEE-754 targets such as `vax-netbsdelf' that lack them, causing build warnings and failures like: In file included from .../libgfortran/generated/maxval_r4.c:26: .../libgfortran/generated/maxval_r4.c: In function 'maxval_r4': .../libgfortran/libgfortran.h:292:30: warning: target format does not support infinity 292 | # define GFC_REAL_4_INFINITY __builtin_inff () | ^~~~~~~~~~~~~~ .../libgfortran/generated/maxval_r4.c:149:19: note: in expansion of macro 'GFC_REAL_4_INFINITY' 149 | result = -GFC_REAL_4_INFINITY; | ^~~~~~~~~~~~~~~~~~~ .../libgfortran/generated/maxval_r4.c: In function 'mmaxval_r4': .../libgfortran/libgfortran.h:292:30: warning: target format does not support infinity 292 | # define GFC_REAL_4_INFINITY __builtin_inff () | ^~~~~~~~~~~~~~ .../libgfortran/generated/maxval_r4.c:363:19: note: in expansion of macro 'GFC_REAL_4_INFINITY' 363 | result = -GFC_REAL_4_INFINITY; | ^~~~~~~~~~~~~~~~~~~ {standard input}: Assembler messages: {standard input}:204: Fatal error: Can't relocate expression make[3]: *** [Makefile:3358: maxval_r4.lo] Error 1 Correct the checks then for __FLT_HAS_INFINITY__, __DBL_HAS_INFINITY__, __LDBL_HAS_INFINITY__, __FLT_HAS_QUIET_NAN__, __DBL_HAS_QUIET_NAN__, and __LDBL_HAS_QUIET_NAN__ to match semantics and remove build issues coming from the misinterpretation of these macros. libgfortran/ * libgfortran.h: Use #if rather than #ifdef with __FLT_HAS_INFINITY__, __DBL_HAS_INFINITY__, __LDBL_HAS_INFINITY__, __FLT_HAS_QUIET_NAN__, __DBL_HAS_QUIET_NAN__, and __LDBL_HAS_QUIET_NAN__.
2020-11-22Daily bump.GCC Administrator1-0/+5
2020-11-21Darwin, libgfortran : Do not use environ directly from the library.Iain Sandoe1-0/+5
On macOS / Darwin, the environ variable can be used directly in the code of an executable, but cannot be used in the code of a shared library (i.e. libgfortran.dylib), in this case. In such cases, the function _NSGetEnviron should be called to get the address of 'environ'. libgfortran/ChangeLog: * intrinsics/execute_command_line.c (environ): Use _NSGetEnviron to get the environment pointer on Darwin.
2020-11-02Daily bump.GCC Administrator1-0/+8
2020-10-30PR libfortran/97581 - clean up size calculation of random generator stateHarald Anlauf1-15/+17
The random number generator internal state may be saved to/restored from an array of integers. Clean up calculation of needed number of elements to avoid redefiniton of auxiliary macro SZ. libgfortran/ChangeLog: * intrinsics/random.c (SZ_IN_INT_4): Define size of state in int32_t. (SZ_IN_INT_8): Define size of state in int64_t. (SZ): Remove. (random_seed_i4): Use size SZ_IN_INT_4 instead of SZ. (random_seed_i8): Use size SZ_IN_INT_8 instead of SZ.
2020-10-19Daily bump.GCC Administrator1-0/+31
2020-10-18PR libfortran/97063 - Wrong result for vector (step size is negative) * matrixHarald Anlauf27-1288/+1288
The MATMUL intrinsic provided a wrong result for rank-1 times rank-2 array when a negative stride was used for addressing the elements of the rank-1 array, because a check on strides was erroneously placed before the check on the rank. Interchange order of checks. libgfortran/ChangeLog: * m4/matmul_internal.m4: Move check for rank-1 times rank-2 before checks on strides for rank-2 times rank-2. * generated/matmul_c10.c: Regenerated. * generated/matmul_c16.c: Likewise. * generated/matmul_c4.c: Likewise. * generated/matmul_c8.c: Likewise. * generated/matmul_i1.c: Likewise. * generated/matmul_i16.c: Likewise. * generated/matmul_i2.c: Likewise. * generated/matmul_i4.c: Likewise. * generated/matmul_i8.c: Likewise. * generated/matmul_r10.c: Likewise. * generated/matmul_r16.c: Likewise. * generated/matmul_r4.c: Likewise. * generated/matmul_r8.c: Likewise. * generated/matmulavx128_c10.c: Likewise. * generated/matmulavx128_c16.c: Likewise. * generated/matmulavx128_c4.c: Likewise. * generated/matmulavx128_c8.c: Likewise. * generated/matmulavx128_i1.c: Likewise. * generated/matmulavx128_i16.c: Likewise. * generated/matmulavx128_i2.c: Likewise. * generated/matmulavx128_i4.c: Likewise. * generated/matmulavx128_i8.c: Likewise. * generated/matmulavx128_r10.c: Likewise. * generated/matmulavx128_r16.c: Likewise. * generated/matmulavx128_r4.c: Likewise. * generated/matmulavx128_r8.c: Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/matmul_20.f90: New test.
2020-09-29Daily bump.GCC Administrator1-0/+19