Commit Graph

1920 Commits

Author SHA1 Message Date
Sandra Loosemore b4a9bc7856 Bind(c): Fix bugs in CFI_section
CFI_section was incorrectly adjusting the base pointer for the result
array twice in different ways.  It was also overwriting the array
dimension info in the result descriptor before computing the base
address offset from the source descriptor, which caused problems if
the two descriptors are the same.  This patch fixes both problems and
makes the code simpler, too.

A consequence of this patch is that the result array is now 0-based in
all dimensions instead of starting at the numbering to match the first
element of the source array.  The Fortran standard only specifies the
shape of the result array, not its lower bounds, so this is permitted
and probably less confusing for users as well as implementors.

2021-07-17  Sandra Loosemore  <sandra@codesourcery.com>

	PR libfortran/101310

libgfortran/
	* runtime/ISO_Fortran_binding.c (CFI_section): Fix the base
	address computation and simplify the code.

gcc/testsuite/
	* gfortran.dg/ISO_Fortran_binding_1.c (section_c): Remove
	incorrect assertions.
2021-07-27 21:24:25 -07:00
Sandra Loosemore c4dc9f5901 Bind(C): Correct sizes of some types in CFI_establish
CFI_establish was failing to set the default elem_len correctly for
CFI_type_cptr, CFI_type_cfunptr, CFI_type_long_double, and
CFI_type_long_double_Complex.

2021-07-13  Sandra Loosemore  <sandra@codesourcery.com>

libgfortran/
	PR libfortran/101305
	* runtime/ISO_Fortran_binding.c (CFI_establish): Special-case
	CFI_type_cptr and CFI_type_cfunptr.  Correct size of long double
	on targets where it has kind 10.
2021-07-27 21:20:21 -07:00
Sandra Loosemore fef67987cf Bind(C): Fix type encodings in ISO_Fortran_binding.h
ISO_Fortran_binding.h had many incorrect hardwired kind encodings in
the definitions of the CFI_type_* macros.  Additionally, not all
targets support all the defined type encodings, and the Fortran
standard requires those macros to have a negative value.

This patch changes ISO_Fortran_binding.h to use sizeof instead of
hard-coded sizes, and assembles it from fragments that reflect the
set of types supported by the target.

2021-07-22  Sandra Loosemore  <sandra@codesourcery.com>
	    Tobias Burnus  <tobias@codesourcery.com>

libgfortran/
	PR libfortran/101305
	* ISO_Fortran_binding.h: Fix hard-coded sizes and split into...
	* ISO_Fortran_binding-1-tmpl.h: New file.
	* ISO_Fortran_binding-2-tmpl.h: New file.
	* ISO_Fortran_binding-3-tmpl.h: New file.
	* Makefile.am: Add rule for generating ISO_Fortran_binding.h.
	Adjust pathnames to that file.
	* Makefile.in: Regenerated.
	* mk-kinds-h.sh: New file.
	* runtime/ISO_Fortran_binding.c: Fix include path.
2021-07-27 21:20:21 -07:00
GCC Administrator 1a7febe943 Daily bump. 2021-07-27 00:16:27 +00:00
Tobias Burnus 0cbf03689e PR fortran/93308/93963/94327/94331/97046 problems raised by descriptor handling
Fortran: Fix attributes and bounds in ISO_Fortran_binding.

2021-07-26  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
	    Tobias Burnus  <tobias@codesourcery.com>

	PR fortran/93308
	PR fortran/93963
	PR fortran/94327
	PR fortran/94331
	PR fortran/97046

gcc/fortran/ChangeLog:

	* trans-decl.c (convert_CFI_desc): Only copy out the descriptor
	if necessary.
	* trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Updated attribute
	handling which reflect a previous intermediate version of the
	standard. Only copy out the descriptor if necessary.

libgfortran/ChangeLog:

	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Add code
	to verify the descriptor. Correct bounds calculation.
	(gfc_desc_to_cfi_desc): Add code to verify the descriptor.

gcc/testsuite/ChangeLog:

	* gfortran.dg/ISO_Fortran_binding_1.f90: Add pointer attribute,
	this test is still erroneous but now it compiles.
	* gfortran.dg/bind_c_array_params_2.f90: Update regex to match
	code changes.
	* gfortran.dg/PR93308.f90: New test.
	* gfortran.dg/PR93963.f90: New test.
	* gfortran.dg/PR94327.c: New test.
	* gfortran.dg/PR94327.f90: New test.
	* gfortran.dg/PR94331.c: New test.
	* gfortran.dg/PR94331.f90: New test.
	* gfortran.dg/PR97046.f90: New test.
2021-07-26 14:32:53 +02:00
GCC Administrator 01ac2f08b0 Daily bump. 2021-07-23 00:16:31 +00:00
Sandra Loosemore e4966e1d1d Bind(c): signed char is not a Fortran character type
CFI_allocate and CFI_select_part were incorrectly treating
CFI_type_signed_char as a Fortran character type for the purpose of
deciding whether or not to use the elem_len argument.  It is a Fortran
integer type per table 18.2 in the 2018 Fortran standard.

Other functions in ISO_Fortran_binding.c appeared to handle this case
correctly already.

2021-07-15  Sandra Loosemore  <sandra@codesourcery.com>

libgfortran/
	* runtime/ISO_Fortran_binding.c (CFI_allocate): Don't use elem_len
	for CFI_type_signed_char.
	(CFI_select_part): Likewise.
2021-07-22 15:15:50 -07:00
GCC Administrator bea7c16a46 Daily bump. 2021-07-02 00:16:47 +00:00
Sandra Loosemore 58b735b70b Fortran: set version field in CFI_cdesc_t to CFI_VERSION
When converting a GFC descriptor to a CFI descriptor, it was
incorrectly copying the version number from the former to the latter.
It should be using the value of CFI_VERSION instead (currently 1).
Going the other direction, the GFC version field is initialized to
zero elsewhere, so do that here too.

2021-06-30  Tobias Burnus  <tobias@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	libgfortran/
	* runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc):
	Initialize version field to 0.
	(gfc_desc_to_cfi_desc): Initialize version field to CFI_VERSION.
2021-07-01 13:07:59 -07:00
GCC Administrator 6bc18203dd Daily bump. 2021-06-30 00:16:52 +00:00
Julian Brown c0f8c22a3e Fortran: Re-enable 128-bit integers for AMD GCN
This patch reverts the part of Tobias's patch for PR target/96306 that
disables 128-bit integer support for AMD GCN.

2021-06-18  Julian Brown  <julian@codesourcery.com>

libgfortran/
	PR target/96306
	* configure.ac: Remove stanza that removes KIND=16 integers for AMD GCN.
	* configure: Regenerate.
2021-06-29 08:19:56 -07:00
GCC Administrator 419af06a35 Daily bump. 2021-06-23 00:16:28 +00:00
Sandra Loosemore f61e5d4d8b Fortran: fix sm computation in CFI_allocate [PR93524]
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-22 12:45:47 -07:00
GCC Administrator c603872145 Daily bump. 2021-06-09 00:16:30 +00:00
Martin Liska 48aa5c6003 Fix "tailing" typo.
gcc/fortran/ChangeLog:

	* intrinsic.texi: Fix typo.
	* trans-expr.c (gfc_trans_pointer_assignment): Likewise.

gcc/ChangeLog:

	* genautomata.c (create_automata): Fix typo.

libgfortran/ChangeLog:

	* intrinsics/chmod.c (chmod_internal): Fix typo.
	* io/transfer.c (read_sf): Likewise.

libquadmath/ChangeLog:

	* libquadmath.texi: Fix typo.

gcc/testsuite/ChangeLog:

	* gcc.dg/format/strfmon-1.c: Fix typo.
	* gfortran.dg/char4-subscript.f90: Likewise.
2021-06-08 09:42:18 +02:00
GCC Administrator 28c6247505 Daily bump. 2021-06-06 00:16:22 +00:00
José Rui Faustino de Sousa d514626ee2 Fortran: Fix some issues with pointers to character.
gcc/fortran/ChangeLog:

	PR fortran/100120
	PR fortran/100816
	PR fortran/100818
	PR fortran/100819
	PR fortran/100821
	* trans-array.c (gfc_get_array_span): rework the way character
	array "span" was calculated.
	(gfc_conv_expr_descriptor): improve handling of character sections
	and unlimited polymorphic objects.
	* trans-expr.c (gfc_get_character_len): new function to calculate
	character string length.
	(gfc_get_character_len_in_bytes): new function to calculate
	character string length in bytes.
	(gfc_conv_scalar_to_descriptor): add call to set the "span".
	(gfc_trans_pointer_assignment): set "_len" and antecipate the
	initialization of the deferred character length hidden argument.
	* trans-intrinsic.c (gfc_conv_associated): set "force_no_tmp" to
	avoid the creation of a temporary.
	* trans-types.c (gfc_get_dtype_rank_type): rework type detection
	so that unlimited polymorphic objects get proper type infomation,
	also important for bind(c).
	(gfc_get_dtype): add argument to pass the rank if necessary.
	(gfc_get_array_type_bounds): cosmetic change to have character
	arrays called character instead of unknown.
	* trans-types.h (gfc_get_dtype): modify prototype.
	* trans.c (get_array_span): rework the way character array "span"
	was calculated.
	* trans.h (gfc_get_character_len): new prototype.
	(gfc_get_character_len_in_bytes): new prototype.
	Add "unlimited_polymorphic" flag to "gfc_se" type to signal when
	expression carries an unlimited polymorphic object.

libgfortran/ChangeLog:

	PR fortran/100120
	* intrinsics/associated.c (associated): have associated verify if
	the "span" matches insted of the "elem_len".
	* libgfortran.h (GFC_DESCRIPTOR_SPAN): add macro to retrive the
	descriptor "span".

gcc/testsuite/ChangeLog:

	PR fortran/100120
	* gfortran.dg/PR100120.f90: New test.
	PR fortran/100816
	PR fortran/100818
	PR fortran/100819
	PR fortran/100821
	* gfortran.dg/character_workout_1.f90: New test.
	* gfortran.dg/character_workout_4.f90: New test.
2021-06-05 11:12:50 +00:00
Martin Liska 6bf8847c73 Revert "PR98301 Add missing changelog entries."
This reverts commit c4771b3438.
2021-05-23 14:08:08 +02:00
GCC Administrator 15d30d2f20 Daily bump. 2021-05-23 00:16:24 +00:00
Andre Vehreschild c4771b3438 PR98301 Add missing changelog entries. 2021-05-22 13:36:31 +02:00
Andre Vehreschild 26ca6dbda2 Steve Kargl <kargl@gcc.gnu.org>
PR fortran/98301 - random_init() is broken

Correct implementation of random_init() when -fcoarray=lib is given.

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-22 13:27:42 +02:00
GCC Administrator 449480114a Daily bump. 2021-05-06 00:16:37 +00:00
Tobias Burnus dee371fdd4 libgfortran/intrinsics/chmod.c: Silence unused var warning
libgfortran/ChangeLog:

	* intrinsics/chmod.c (chmod_internal): Only declare mode_mask var
	if HAVE_UMASK.
2021-05-05 11:48:48 +02:00
GCC Administrator 54b20ee0ac Daily bump. 2021-05-03 00:16:25 +00:00
Tobias Burnus a13a50047e Fortran: Async I/O - avoid unlocked unlocking [PR100352]
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.
2021-05-02 18:16:17 +02:00
GCC Administrator 6da2762a3b Daily bump. 2021-03-13 00:16:20 +00:00
Tobias Burnus a6e9633ccb Fortran: Fix libgfortran I/O race with newunit_free [PR99529]
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-12 16:31:32 +01:00
GCC Administrator ceae953382 Daily bump. 2021-03-06 00:16:43 +00:00
Harald Anlauf b1bee29167 PR libfortran/99218 - matmul on temporary array accesses invalid memory
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-05 20:58:51 +01:00
GCC Administrator f3641ac70e Daily bump. 2021-03-04 00:16:48 +00:00
Tobias Burnus 006693a59f libgfortran: Fix negation for largest integer [PR81986]
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-03-03 08:07:16 +01:00
GCC Administrator fab095dad5 Daily bump. 2021-02-13 00:16:38 +00:00
Steve Kargl 0631e008ad libgfortran: Fix PR95647 by changing the interfaces of operators .eq. and .ne.
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-12 07:58:16 -08:00
GCC Administrator 0c5cdb31bd Daily bump. 2021-02-12 00:16:25 +00:00
Jerry DeLisle 19c0232410 libgfortran: Fix unwanted end-of-record by checking if seen_dollar.
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-02-10 19:37:52 -08:00
GCC Administrator aa69f0a820 Daily bump. 2021-01-28 00:16:56 +00:00
Harris Snyder 1cdca4261e Fix strides for C descriptors with stride > 2.
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-27 22:57:41 +01:00
Jerry DeLisle 4905f40401 Fix ChangeLog entries. 2021-01-17 18:27:02 -08:00
GCC Administrator 2f7f0d32e7 Daily bump. 2021-01-16 00:16:29 +00:00
Jerry DeLisle b90e4a9741 fortran: Fixes a bug in ISO_Fortran_binding.c.
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-15 13:48:42 -08:00
GCC Administrator 651b8a50a6 Daily bump. 2021-01-06 00:16:55 +00:00
Samuel Thibault f56de3557f Update GNU/Hurd configure support
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-05 16:04:14 -07:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
GCC Administrator b6dd195aac Daily bump. 2021-01-02 00:16:24 +00:00
Jakub Jelinek 618e665a0f Rotate ChangeLog files - step 2 - remove 2020 entries from ChangeLog files.
Can't be committed together with the previous one due to the ChangeLog vs.
other files restrictions.
2021-01-01 17:30:04 +01:00
Jakub Jelinek 6e92696278 Rotate ChangeLog files - part 1 - add ChangeLog-2020.
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.
2021-01-01 17:27:52 +01:00
GCC Administrator 6e1edf48eb Daily bump. 2020-12-06 00:16:44 +00:00
Iain Sandoe 1352bc88a0 Darwin : Update libtool and dependencies for Darwin20 [PR97865]
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-12-05 08:43:20 +00:00
GCC Administrator a9625c50dd Daily bump. 2020-11-30 00:16:27 +00:00
John David Anglin 4e4ba6478a Fix hppa64-hpux11 build to remove source paths from embedded path.
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-29 20:11:38 +00:00
GCC Administrator d48df6f24b Daily bump. 2020-11-27 00:16:31 +00:00
Maciej W. Rozycki beb9afcaf1 libgfortran: Verify the presence of all functions for POSIX 2008 locale
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-26 17:26:43 +00:00
Maciej W. Rozycki c87cce5a33 libgfortran: Correct FP feature macro checks
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-26 17:26:43 +00:00
GCC Administrator 7a97e2fcf7 Daily bump. 2020-11-22 00:16:24 +00:00
Iain Sandoe a345413076 Darwin, libgfortran : Do not use environ directly from the library.
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-21 09:06:49 +00:00
GCC Administrator 88ce3d5fbb Daily bump. 2020-11-02 20:53:00 +00:00
Harald Anlauf 667db6dedd PR libfortran/97581 - clean up size calculation of random generator state
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-30 20:49:32 +01:00
GCC Administrator 3acb91a48e Daily bump. 2020-10-19 00:16:22 +00:00
Harald Anlauf cd6cd6aed1 PR libfortran/97063 - Wrong result for vector (step size is negative) * matrix
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-10-18 20:15:26 +02:00
GCC Administrator e84761c6f3 Daily bump. 2020-09-29 00:16:30 +00:00
Tobias Burnus 69c56ce673 libgfortran/m4/unpack.m4: Silence -Wmaybe-uninitialized
libgfortran/ChangeLog:

	* m4/unpack.m4 (unpack0_'rtype_code`,
	unpack1_'rtype_code`): Move 'rstride[0]' initialization outside
	conditional branch to silence -Wmaybe-uninitialized.
	* generated/unpack_c10.c: Regenerate.
	* generated/unpack_c16.c: Regenerate.
	* generated/unpack_c4.c: Regenerate.
	* generated/unpack_c8.c: Regenerate.
	* generated/unpack_i1.c: Regenerate.
	* generated/unpack_i16.c: Regenerate.
	* generated/unpack_i2.c: Regenerate.
	* generated/unpack_i4.c: Regenerate.
	* generated/unpack_i8.c: Regenerate.
	* generated/unpack_r10.c: Regenerate.
	* generated/unpack_r16.c: Regenerate.
	* generated/unpack_r4.c: Regenerate.
	* generated/unpack_r8.c: Regenerate.
2020-09-28 23:10:31 +02:00
GCC Administrator 4383c595ce Daily bump. 2020-09-28 00:16:21 +00:00
Clément Chigot 3c11f25fb8 aix: Use $(AR) without -X32_64 to build FAT libraries.
AIX FAT libraries should be built with the version of AR chosen by configure.
The GNU Make $(AR) variable includes the AIX -X32_64 option needed
by the default Makefile rules to accept both 32 bit and 64 bit object files.
The -X32_64 option conflicts with ar archiving objects of the same name
used to build FAT libraries.

This patch changes the Makefile fragments for AIX FAT libraries to use $(AR),
but strips the -X32_64 option from the Make variable.

libgcc/ChangeLog:

2020-09-27  Clement Chigot  <clement.chigot@atos.net>

	* config/rs6000/t-slibgcc-aix: Use $(AR) without -X32_64.

libatomic/ChangeLog:

2020-09-27  Clement Chigot  <clement.chigot@atos.net>

	* config/t-aix: Use $(AR) without -X32_64.

libgomp/ChangeLog:

2020-09-27  Clement Chigot  <clement.chigot@atos.net>

	* config/t-aix: Use $(AR) without -X32_64.

libstdc++-v3/ChangeLog:

2020-09-27  Clement Chigot  <clement.chigot@atos.net>

	* config/os/aix/t-aix: Use $(AR) without -X32_64.

libgfortran/ChangeLog:

2020-09-27  Clement Chigot  <clement.chigot@atos.net>

	* config/t-aix: Use $(AR) without -X32_64.
2020-09-27 12:43:29 -04:00
GCC Administrator 6e82b6cfcf Daily bump. 2020-09-04 00:16:32 +00:00
Harald Anlauf 8eeeecbcc1 PR fortran/96890 - Wrong answer with intrinsic IALL
The IALL intrinsic would always return 0 when the DIM and MASK arguments
were present since the initial value of repeated BIT-AND operations was
set to 0 instead of -1.

libgfortran/ChangeLog:

	* m4/iall.m4: Initial value for result should be -1.
	* generated/iall_i1.c (miall_i1): Generated.
	* generated/iall_i16.c (miall_i16): Likewise.
	* generated/iall_i2.c (miall_i2): Likewise.
	* generated/iall_i4.c (miall_i4): Likewise.
	* generated/iall_i8.c (miall_i8): Likewise.

gcc/testsuite/ChangeLog:

	* gfortran.dg/iall_masked.f90: New test.
2020-09-03 20:33:14 +02:00
GCC Administrator b2b24d30bb Daily bump. 2020-08-25 00:16:24 +00:00
Mark Eggleston de09e7ebc9 Fortran : get_environment_variable runtime error PR96486
Runtime error occurs when the type of the value argument is
character(0):  "Zero-length string passed as value...".
The status argument, intent(out), will contain -1 if the value
of the environment is too large to fit in the value argument, this
is the case if the type is character(0) so there is no reason to
produce a runtime error if the value argument is zero length.

2020-08-24  Mark Eggleston  <markeggleston@gcc.gnu.org>

libgfortran/

	PR fortran/96486
	* intrinsics/env.c: If value_len is > 0 blank the string.
	Copy the result only if its length is > 0.

2020-08-24  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

	PR fortran/96486
	* gfortran.dg/pr96486.f90: New test.
2020-08-24 11:13:11 +01:00
GCC Administrator 5b9a3d2a05 Daily bump. 2020-08-21 00:16:23 +00:00
Mark Eggleston c2a0fd7c8f Fortran : rejected f0.d edit descriptor PR96436
Zero length f format descriptors are valid for Fortran 95 and
later.  For g format descriptors from Fortran 2008 and later.
Finally for D, E, EN and ES for Fortran 2018 and later.

2020-08-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

libgfortran/

	PR fortran/96436
	* io/format.c (parse_format_list):  Add new local variable
	"standard" to hold the required standard to check. If the
	format width is zero select standard depending on descriptor.
	Call notification_std using the new standard variable.

2020-08-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

	PR fortran/96436
	* gfortran.dg/pr96436_1.f90: New test.
	* gfortran.dg/pr96436_2.f90: New test.
	* gfortran.dg/pr96436_3.f90: New test.
	* gfortran.dg/pr96436_4.f90: New test.
	* gfortran.dg/pr96436_5.f90: New test.
	* gfortran.dg/pr96436_6.f90: New test.
	* gfortran.dg/pr96436_7.f90: New test.
	* gfortran.dg/pr96436_8.f90: New test.
	* gfortran.dg/pr96436_9.f90
	* gfortran.dg/pr96436_10.f90
2020-08-20 07:40:55 +01:00
GCC Administrator deee2322a2 Daily bump. 2020-08-18 00:16:26 +00:00
David Edelsohn 26fdc47da7 aix: Support libgfortran libcaf_single.a as a FAT library
Build libgfortran static library libcaf_single.a as a FAT 32/64 bit library.

libgfortran/ChangeLog:

2020-08-17  David Edelsohn  <dje.gcc@gmail.com>
	    Clement Chigot  <clement.chigot@atos.net>

	* config/t-aix: Add complementary mode object file to libcaf_single.a.
2020-08-17 14:05:41 -04:00
GCC Administrator 6a1ad710ad Daily bump. 2020-08-04 00:16:24 +00:00
Tobias Burnus 58cfec3a6e libgfortran/caf/single.c: Fix typo.
libgfortran/ChangeLog

	* caf/single.c (_gfortran_caf_lock): Fix typo.
2020-08-03 09:41:24 +02:00
GCC Administrator 049fbbdc60 Daily bump. 2020-07-27 00:16:20 +00:00
Tobias Burnus 2e764ae1d6 libgfortran: Skip integer-kind=16 check for amdgcn
libgfortran/ChangeLog:

	PR target/96306
	* configure.ac: Add LIBGOMP_CHECKED_INT_KINDS and
	LIBGOMP_CHECKED_REAL_KINDS and use it for to skip
	integer kind=16 checks for amdgcn.
	* Makefile.am (kinds.h, selected_int_kind.inc,
	selected_real_kind.inc): Pass them on.
	* mk-kinds-h.sh: Takes to-be-check kinds as argument.
	* mk-sik-inc.sh: Likewise.
	* mk-srk-inc.sh: Likewise.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
2020-07-26 07:20:24 +02:00
GCC Administrator 53256ee3d5 Daily bump. 2020-07-25 00:16:22 +00:00
Dominique d'Humieres aa7e7eff5e PR 93567, G edit descriptor uses E instead of F editing in rounding mode UP.
The switch between FMT_E and FMT_F is based on the absolute value.
Set r=0 for rounding toward zero and r = 1 otherwise.
If (exp_d - m) == 1 there is no rounding needed.

libgfortran/ChangeLog:

	PR fortran/93567
	* io/write_float.def (determine_en_precision): Fix switch between
	FMT_E and FMT_F.

gcc/testsuite/ChangeLog:

	PR fortran/93567
	* gfortran.dg/round_3.f08: Add test cases.
2020-07-24 20:47:47 +02:00
Dominique d'Humieres 05e0971bcf PR 93592 - Invalid UP/DOWN rounding with EN descriptor.
The fix is obvious (I have added a comment). The tests are probably
an overkill, but it does not hurt.

libgfortran/ChangeLog:

	PR fortran/93592
	* io/write_float.def (build_float_string): Do not reset
	  nbefore for FMT_F and FMT_EN.

gcc/testsuite/ChangeLog:

	PR fortran/93592
	* gfortran.dg/fmt_en.f90: Adjust test.
	* gfortran.dg/fmt_en_rd.f90: New test.
	* gfortran.dg/fmt_en_rn.f90: New test.
	* gfortran.dg/fmt_en_ru.f90: New test.
	* gfortran.dg/fmt_en_rz.f90: New test.
2020-07-24 20:47:30 +02:00
GCC Administrator 8ca07a3072 Daily bump. 2020-07-15 00:16:35 +00:00
David Edelsohn 4f97bed9a7 aix: FAT libraries: test native compiler mode directly
The FAT libraries config fragments need to know which library is native
and which is a multilib to choose the correct multilib from which to
append the additional object file or shared object file.  Testing the
top-level archive is fragile because it will fail if rebuilding.  This
patch tests the compiler preprocessing macros for the 64 bit AIX specific
__64BIT__ to determine the native mode of the compiler in MULTILIBTOP.

2020-07-14  David Edelsohn  <dje.gcc@gmail.com>

libatomic/ChangeLog

	* config/t-aix: Set BITS from compiler cpp macro.

libgcc/ChangeLog

	* config/rs6000/t-slibgcc-aix: Set BITS from compiler cpp macro.

libgfortran/ChangeLog

	* config/t-aix: Set BITS from compiler cpp macro.

libgomp/ChangeLog

	* config/t-aix: Set BITS from compiler cpp macro.

libstdc++-v3/ChangeLog

	* config/os/aix/t-aix: Set BITS from compiler cpp macro.
2020-07-14 10:41:40 -04:00
GCC Administrator 605a8f3bbc Daily bump. 2020-06-23 00:16:23 +00:00
David Edelsohn 0164e59835 build: Use -include instead of conditional include.
Automake and GNU Make both use the endif keyword, which conflicts and
elicits an error for matching if/ifdef and endif.

This patch changes the conditional include to use "-include" to prevent
a warning about a possible empty tmake_file.

libgomp/ChangeLog

2020-06-22  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am: Use -include.
	* Makefile.in: Regenerate.

libatomic/ChangeLog

2020-06-22  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am: Use -include.
	* Makefile.in: Regenerate.

libstdc++-v3/ChangeLog

2020-06-22  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am: Use -include.
	* Makefile.in: Regenerate.

libgfortran/ChangeLog

2020-06-22  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am: Use -include.
	* Makefile.in: Regenerate.
2020-06-22 21:31:48 +00:00
GCC Administrator f86e11a267 Daily bump. 2020-06-22 00:16:23 +00:00
David Edelsohn 47ddb895df aix: Add GCC64 configuration and FAT target libraries.
This patch adds the ability to configure GCC on AIX to build as a
64 bit application and to build target libraries "FAT" libraries in both
32 bit and 64 bit mode.

The patch adds makefile fragment hooks to target libraries that allows
them to include target-specific rules.  The target specific rules for
AIX place both 32 bit and 64 bit objects and shared objects
in archives at the top-level, not multilib subdirectories.  The
multilibs are built in subdirectories, but must be combined during the
last parts of the target library build process.  Because of the way
that GCC bootstrap works, the libraries must be combined during the
multiple stages of GCC bootstrap, not solely when installed in the
final destination, so the libraries are correct at the end of
each target library build stage, not solely an install recipe.

gcc/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* config.gcc: Use t-aix64, biarch64 and default64 for cpu_is_64bit.
	* config/rs6000/aix72.h (ASM_SPEC): Remove aix64 option.
	(ASM_SPEC32): New.
	(ASM_SPEC64): New.
	(ASM_CPU_SPEC): Remove vsx and altivec options.
	(CPP_SPEC_COMMON): Rename from CPP_SPEC.
	(CPP_SPEC32): New.
	(CPP_SPEC64): New.
	(CPLUSPLUS_CPP_SPEC): Rename to CPLUSPLUS_CPP_SPEC_COMMON..
	(TARGET_DEFAULT): Only define if not BIARCH.
	(LIB_SPEC_COMMON): Rename from LIB_SPEC.
	(LIB_SPEC32): New.
	(LIB_SPEC64): New.
	(LINK_SPEC_COMMON): Rename from LINK_SPEC.
	(LINK_SPEC32): New.
	(LINK_SPEC64): New.
	(STARTFILE_SPEC): Add 64 bit version of crtcxa and crtdbase.
	(ASM_SPEC): Define 32 and 64 bit alternatives using DEFAULT_ARCH64_P.
	(CPP_SPEC): Same.
	(CPLUSPLUS_CPP_SPEC): Same.
	(LIB_SPEC): Same.
	(LINK_SPEC): Same.
	(SUBTARGET_EXTRA_SPECS): Add new 32/64 specs.
	* config/rs6000/defaultaix64.h: New file.
	* config/rs6000/t-aix64: New file.

libgcc/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* config.host (extra_parts): Add crtcxa_64 and crtdbase_64.
	* config/rs6000/t-aix-cxa: Explicitly compile 32 bit with -maix32
	and 64 bit with -maix64.
	* config/rs6000/t-slibgcc-aix: Remove extra @multilib_dir@ level.
	Build and install AIX-style FAT libraries.

libgomp/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
	* Makefile.in: Regenerate
	* configure.ac (tmake_file): Substitute.
	* configure: Regenerate.
	* configure.tgt (powerpc-ibm-aix*): Define tmake_file.
	* config/t-aix: New file.

libstdc++-v3/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
	* Makefile.in: Regenerate.
	* configure.ac (tmake_file): Substitute.
	* configure: Regenerate.
	* configure.host (aix*): Define tmake_file.
	* config/os/aix/t-aix: New file.

libatomic/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
	* Makefile.in: Regenerate.
	* configure.ac (tmake_file): Substitute.
	* configure: Regenerate.
	* configure.tgt (powerpc-ibm-aix*): Define tmake_file.
	* config/t-aix: New file.

libgfortran/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

	* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
	* Makefile.in: Regenerate.
	* configure.ac (tmake_file): Substitute.
	* configure: Regenerate.
	* configure.host: Add system configury stanza. Define tmake_file.
	* config/t-aix: New file.
2020-06-21 14:14:46 -04:00
GCC Administrator efb4d74555 Daily bump. 2020-06-14 00:16:18 +00:00
Thomas Koenig 0cfc34ad12 Disable -Wstringop-overflow warning after checking code path of caller.
The warning that is disabled, only on this single line, has been
inspected and found to be not applicable; it is known that the size
of the buffer is safe.

libgfortran/ChangeLog:

2020-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/95313
	* io/write.c (ztoa_big): Disable -Wstringop-overflow for one
	line.
2020-06-13 10:04:33 +02:00
GCC Administrator 2c455ae06c Daily bump. 2020-06-09 00:16:47 +00:00
Harald Anlauf 8cd239614e PR fortran/95195 - Fortran testcase should clean up afterwards
Change testcase to check error message (iomsg) at runtime, rather than to crash.

libgfortran/
	PR fortran/95091
	* io/transfer.c (finalize_transfer): Fix type in error message.

gcc/testsuite/
	PR fortran/95195
	* gfortran.dg/namelist_97.f90: Adjust testcase.
2020-06-08 21:01:06 +02:00
GCC Administrator 4a9aa9dec7 Daily bump. 2020-06-02 00:16:25 +00:00
Uros Bizjak 832c1192eb i386: Add __attribute__ ((gcc_struct)) to struct fenv [PR95418]
Windows ABI (MinGW) is different than Linux ABI when bitfileds are involved.
The following patch adds __attribute__ ((gcc_struct)) to struct fenv in order
to match the layout of x87 state image in memory.

2020-06-01  Uroš Bizjak  <ubizjak@gmail.com>

libatomic/ChangeLog:
	* config/x86/fenv.c (struct fenv): Add __attribute__ ((gcc_struct)).

libgcc/ChangeLog:
	* config/i386/sfp-exceptions.c (struct fenv):
	Add __attribute__ ((gcc_struct)).

libgfortran/ChangeLog:
	PR libfortran/95418
	* config/fpu-387.h (struct fenv): Add __attribute__ ((gcc_struct)).
2020-06-01 22:29:20 +02:00
GCC Administrator 885ef72f27 Daily bump. 2020-05-30 00:16:27 +00:00
H.J. Lu 9051b54827 Avoid nested save_CFLAGS and save_LDFLAGS
Avoid nested save_CFLAGS and save_LDFLAGS by replacing save_CFLAGS and
save_LDFLAGS with cet_save_CFLAGS and cet_save_LDFLAGS in cet.m4.

config/

	PR bootstrap/95413
	* cet.m4: Replace save_CFLAGS and save_LDFLAGS with
	cet_save_CFLAGS and cet_save_LDFLAGS.

gcc/

	PR bootstrap/95413
	* configure: Regenerated.

libatomic/

	PR bootstrap/95413
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/95413
	* configure: Regenerated.

libcc1/

	PR bootstrap/95413
	* configure: Regenerated.

libcpp/

	PR bootstrap/95413
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/95413
	* configure: Regenerated.

libgcc/

	PR bootstrap/95413
	* configure: Regenerated.

libgfortran/

	PR bootstrap/95413
	* configure: Regenerated.

libgomp/

	PR bootstrap/95413
	* configure: Regenerated.

libiberty/

	PR bootstrap/95413
	* configure: Regenerated.

libitm/

	PR bootstrap/95413
	* configure: Regenerated.

libobjc/

	PR bootstrap/95413
	* configure: Regenerated.

libphobos/

	PR bootstrap/95413
	* configure: Regenerated.

libquadmath/

	PR bootstrap/95413
	* configure: Regenerated.

libsanitizer/

	PR bootstrap/95413
	* configure: Regenerated.

libssp/

	PR bootstrap/95413
	* configure: Regenerated.

libstdc++-v3/

	PR bootstrap/95413
	* configure: Regenerated.

libvtv/

	PR bootstrap/95413
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/95413
	* configure: Regenerated.

zlib/

	PR bootstrap/95413
	* configure: Regenerated.
2020-05-29 12:56:40 -07:00
Jakub Jelinek 316fe6b401 libgfortran: Export forgotten _gfortran_{,m,s}findloc{0,1}_c10 [PR95390]
I have noticed we don't export these 6 symbols and thus the testcase
below fails to link.

2020-05-29  Jakub Jelinek  <jakub@redhat.com>

	PR libfortran/95390
	* gfortran.dg/findloc_8.f90: New test.

	* Makefile.am (i_findloc0_c): Add findloc0_i10.c.
	(i_findloc1_c): Add findloc1_i10.c.
	* gfortran.map (GFORTRAN_10.2): New symbol version, export
	_gfortran_{,m,s}findloc{0,1}_c10 symbols.
	* Makefile.in: Regenerated.
	* generated/findloc0_c10.c: Generated.
	* generated/findloc1_c10.c: Generated.
2020-05-29 19:01:50 +02:00
GCC Administrator 53ffb43a79 Daily bump. 2020-05-29 00:16:23 +00:00
Harald Anlauf 6ce3d791df PR fortran/95104 - Segfault on a legal WAIT statement
The initial commit for this PR uncovered a latent issue with unit locking
in the Fortran run-time library.  Add check for valid unit.

2020-05-28  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
	PR libfortran/95104
	* io/unit.c (unlock_unit): Guard by check for NULL pointer.
2020-05-28 21:53:17 +02:00
GCC Administrator c3a4169be9 Daily bump. 2020-05-27 07:45:56 +00:00
Harald Anlauf 56f03cd12b PR fortran/95104 - Segfault on a legal WAIT statement
Referencing a unit in a WAIT statement that has not been opened before
resulted in a NULL pointer dereference.  Check for this condition.

2020-05-26  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
	PR libfortran/95104
	* io/transfer.c (st_wait_async): Do not dereference NULL pointer.

gcc/testsuite/
	PR libfortran/95104
	* gfortran.dg/pr95104.f90: New test.

Co-Authored-By: Steven G. Kargl  <kargl@gcc.gnu.org>
2020-05-26 23:29:52 +02:00
Harald Anlauf 8d8a25b0a7 PR libfortran/95195 - improve runtime error for namelist i/o to unformatted file
Namelist input/output to unformatted files is prohibited.
Generate useful runtime errors instead instead of misleading ones.

2020-05-26  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
	PR fortran/95195
	* io/transfer.c (finalize_transfer): Generate runtime error for
	namelist input/output to unformatted file.

gcc/testsuite/
	PR fortran/95195
	* gfortran.dg/namelist_97.f90: New test.
2020-05-26 21:33:46 +02:00
Thomas Koenig 8df7ee67f6 Fixes a hang on an invalid ID in a WAIT statement.
gcc/fortran/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/95191
	* libgfortran.h (libgfortran_error_codes): Add
	LIBERROR_BAD_WAIT_ID.

libgfortran/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/95191
	* io/async.c (async_wait_id): Generate error if ID is higher
	than the highest current ID.
	* runtime/error.c (translate_error): Handle LIBERROR_BAD_WAIT_ID.

libgomp/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR libfortran/95191
	* testsuite/libgomp.fortran/async_io_9.f90: New test.
2020-05-23 19:01:43 +02:00
H.J. Lu 8ebc2f5e05 libgfortran: Use __builtin_cpu_is/__builtin_cpu_supports
* m4/matmul.m4: Don't include <config/i386/cpuinfo.h>.  Use
	__builtin_cpu_is/__builtin_cpu_supports
	* 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.
2020-05-21 03:54:47 -07:00