]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agoDarwin, PPC, testsuite - backport fix for safe-indirect-jump* fails.
Iain Sandoe [Sun, 4 Aug 2019 12:59:22 +0000 (12:59 +0000)] 
Darwin, PPC, testsuite - backport fix for safe-indirect-jump* fails.

The -mno-speculate-indirect-jumps functionality is not implemented for
Darwin.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin.
* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.

From-SVN: r274088

6 years agoDarwin, PPC, testsuite - backport fix for powerpc/spec-barr-1.c
Iain Sandoe [Sun, 4 Aug 2019 12:55:56 +0000 (12:55 +0000)] 
Darwin, PPC, testsuite - backport fix for powerpc/spec-barr-1.c

We just needed to adjust the regex to accept Darwin's register names.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex
to recognise Darwin's register names.

From-SVN: r274087

6 years agoDarwin, testsuite - backport fix for cpp/isysroot-1.c.
Iain Sandoe [Sun, 4 Aug 2019 12:52:31 +0000 (12:52 +0000)] 
Darwin, testsuite - backport fix for cpp/isysroot-1.c.

For the test to succeed there needs to be some header that is to be found in
the 'expected' place i.e. <sysroot>/usr/include/. It's important that it is
not the name of a header for which fixincludes have been applied, since such
headers will be found in the gcc include-fixed dir and, in general, reference
additional headers. The dummy sysroot will prevent the additional headers
from being found, resulting in a failed test. The fix is to use a header name
that isn't expected to be present in a real sysroot.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/cpp/isysroot-1.c: Use <example.h> as the test header.
* gcc.dg/cpp/usr/include/stdio.h: Rename...
* gcc.dg/cpp/usr/include/example.h: ... to this.

From-SVN: r274086

6 years agoDarwin, PPC< testsuite - backport fix for powerpc/builtins-2.c
Iain Sandoe [Sun, 4 Aug 2019 12:49:12 +0000 (12:49 +0000)] 
Darwin, PPC< testsuite - backport fix for powerpc/builtins-2.c

This cannot pass for current Darwin, since it requires VSX and we
don't have any hardware supporting that. Add a dg-requires clause
for this.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/builtins-2.c: Require VSX hardware support.

From-SVN: r274085

6 years agoDarwin, PPC, testsuite, backport fix for pr80125.
Iain Sandoe [Sun, 4 Aug 2019 12:46:00 +0000 (12:46 +0000)] 
Darwin, PPC, testsuite, backport fix for pr80125.

Darwin (unlike most of the members of the PowerPC port family)
defaults to signed chars, so the test was failing to compile with
a "mismatched parameters" error.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/pr80125.c (foo): Use an unsigned char
vector explicitly for the vec_perm.

From-SVN: r274084

6 years agoDarwin, PPC, testsuite - backport fix for builtins-1.
Iain Sandoe [Sun, 4 Aug 2019 12:40:43 +0000 (12:40 +0000)] 
Darwin, PPC, testsuite - backport fix for builtins-1.

This needs to account for Darwin's __USER_LABEL_PREFIX__.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/builtins-1.c: Account for Darwin's use of
__USER_LABEL_PREFIX__.

From-SVN: r274083

6 years agoDarwin, PPC, testsuite, backport fix for pr71785.
Iain Sandoe [Sun, 4 Aug 2019 12:37:28 +0000 (12:37 +0000)] 
Darwin, PPC, testsuite, backport fix for pr71785.

Firstly, we adjust the test conditions to use non-PIC code for Darwin.
Secondly, we have to account for out-of-line GPR restores which gives
a false positive on one of the scan-assembler-not. Lastly, we make the
test a bit more specific for Darwin - that it looks for absence of
branches to local labels.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
expect the out-of-line GPR restore, and test specifically for
absence of branches to local labels.

From-SVN: r274082

6 years agoDarwin, PPC, testsuite, require DFP for two tests using it.
Iain Sandoe [Sun, 4 Aug 2019 12:29:53 +0000 (12:29 +0000)] 
Darwin, PPC, testsuite, require DFP for two tests using it.

The two tests use decimal floating point, add the relevant dg-requires
so that they are unsupported on platforms without DFP.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-22  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/pr64205.c: Require effective target dfp.
* gcc.target/powerpc/pr79909.c: Likewise.

From-SVN: r274081

6 years agoDarwin, ppc, testsuite, backport fix for darwin-bool-1.
Iain Sandoe [Sun, 4 Aug 2019 12:22:55 +0000 (12:22 +0000)] 
Darwin, ppc, testsuite, backport fix for darwin-bool-1.

This test is failing because of a pedantic warning that is unrelated to the
purpose of the test. Fixed by suppressing that warning

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-22  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic
warning about _Bool.

From-SVN: r274080

6 years agoDarwin, testsuite, backport fix for pr71694.
Iain Sandoe [Sun, 4 Aug 2019 12:16:10 +0000 (12:16 +0000)] 
Darwin, testsuite, backport fix for pr71694.

This test fails for Darwin m32 because it's scanning for absence
of an instruction that's validly used in PIC code.  Fixed, in this
case, by using non-PIC codegen.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/pr71694.C: Use non-PIC codegen for Darwin m32.

From-SVN: r274079

6 years agoDarwin, testsuite, backport fix for darwin-minversion-1,2.
Iain Sandoe [Sun, 4 Aug 2019 12:12:30 +0000 (12:12 +0000)] 
Darwin, testsuite, backport fix for darwin-minversion-1,2.

Newer OS versions (10.14+) do not provide some of the CRTs that are used
for older ones (e.g. 10.5), and thus link tests that specify targeting
such a revision fail. We retain the testing of the correct defined OS
version number but switch to compile-only testing for these two tests.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/darwin-minversion-1.c: Use compile rather than link/run.
* gcc.dg/darwin-minversion-2.c: Likewise.

From-SVN: r274078

6 years agoDarwin, testsuite, require alias support in a test using it.
Iain Sandoe [Sun, 4 Aug 2019 12:08:41 +0000 (12:08 +0000)] 
Darwin, testsuite, require alias support in a test using it.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/pr90760.c: Require alias support.

From-SVN: r274077

6 years agoDarwin, testsuite, backport fix for PR65364
Iain Sandoe [Sun, 4 Aug 2019 12:04:06 +0000 (12:04 +0000)] 
Darwin, testsuite, backport fix for PR65364

This test currently fails on Darwin, because the port inlines fn2 for
both PIC (and non-pic for m32).  Fixed by adjusting the target condition.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-11  Iain Sandoe  <iain@sandoe.co.uk>

PR testsuite/65364
* gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin.
(fn2): Likewise.

From-SVN: r274076

6 years agoDarwin, testsuite, backport fix for test using aliases.
Iain Sandoe [Sun, 4 Aug 2019 12:00:42 +0000 (12:00 +0000)] 
Darwin, testsuite, backport fix for test using aliases.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-10  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/attr-copy-6.c: Require alias support.

From-SVN: r274075

6 years agoDarwin, testsuite, backport fix for cpp0x/alignas4.C
Iain Sandoe [Sun, 4 Aug 2019 11:57:41 +0000 (11:57 +0000)] 
Darwin, testsuite, backport fix for cpp0x/alignas4.C

Darwin produces aligned zerofill directives for the objects represented.
We can scan for these using lp64 and ilp32 to catch operation on both
X86 and PowerPC ports (the test is for the alignment which is the trailing
value in the zerofill directive, as a power of two).

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-06  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax
on Darwin.

From-SVN: r274074

6 years agoDarwin, X86, backport test adjusts for PR90698.
Iain Sandoe [Sun, 4 Aug 2019 11:54:13 +0000 (11:54 +0000)] 
Darwin, X86, backport test adjusts for PR90698.

We don't have support for -mcmodel={medium, large, kernel} so don't
expect tests for those things to work.

For now mark them as xfail where possible and skip where that isn't.
These changes will be logged onto the PR and therefore can be backed
out when the facility is implemented.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-01  Iain Sandoe  <iain@sandoe.co.uk>

PR target/90698
* gcc.target/i386/pr49866.c: XFAIL for Darwin.
* gcc.target/i386/pr63538.c: Likewise.
* gcc.target/i386/pr61599-1.c: Skip for Darwin.

From-SVN: r274073

6 years agoDarwin, testsuite, require alias in a test where it's used.
Iain Sandoe [Sun, 4 Aug 2019 11:46:44 +0000 (11:46 +0000)] 
Darwin, testsuite, require alias in a test where it's used.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/cpp0x/pr84497.C: Require alias support.

From-SVN: r274072

6 years agoDarwin, X86, backport testsuite fixes for align syntax.
Iain Sandoe [Sun, 4 Aug 2019 11:43:19 +0000 (11:43 +0000)] 
Darwin, X86, backport testsuite fixes for align syntax.

Darwin has a .align taking a power of 2 by default, so that some
tests expecting a byte count are failing.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/falign-functions-3.c: Adjust align syntax
and label for Darwin.
* gcc.target/i386/attr-aligned-2.c: Adjust align syntax for
Darwin.

From-SVN: r274071

6 years agoDarwin, x86, backport TLS test fixes.
Iain Sandoe [Sun, 4 Aug 2019 11:40:24 +0000 (11:40 +0000)] 
Darwin, x86, backport TLS test fixes.

Require native TLS for two tests that use it.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-30  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr86257.c: Require native TLS support.
* gcc.target/i386/stack-prot-sym.c: Likewise.

From-SVN: r274070

6 years agoDarwin, x86, testsuite - backport for for pr22076 fail.
Iain Sandoe [Sun, 4 Aug 2019 11:32:48 +0000 (11:32 +0000)] 
Darwin, x86, testsuite - backport for for pr22076 fail.

Darwin has a .align taking a power of 2 by default, so that some
tests expecting a byte count are failing, fixed thus.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-27  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr22076.c: Adjust options to
match codegen expected by the scan-asms.

From-SVN: r274069

6 years agoDarwin, X86, backport fixes for three PIE tests.
Iain Sandoe [Sun, 4 Aug 2019 11:01:41 +0000 (11:01 +0000)] 
Darwin, X86, backport fixes for three PIE tests.

Darwin requires PIC code in order to support PIE, amend the test scan-asms
to match this.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-26  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to
account for PIC code on Darwin.
* gcc.target/i386/pr39013-2.c: Likewise.
* gcc.target/i386/pr64317.c: Likewise.

From-SVN: r274068

6 years agoDarwin, X86, backport test fix for pr59874-3.
Iain Sandoe [Sun, 4 Aug 2019 10:53:48 +0000 (10:53 +0000)] 
Darwin, X86, backport test fix for pr59874-3.

This test fails on Darwin because the port has a different
spelling for popcnt.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-25  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr59874-3.c: Use the spelling of popcnt
expected for Darwin.

From-SVN: r274067

6 years agoDarwin, x86, backport testsuite fix.
Iain Sandoe [Sun, 4 Aug 2019 10:47:16 +0000 (10:47 +0000)] 
Darwin, x86, backport testsuite fix.

Require alias support in a test using aliases.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-25  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr82659-3.c: Require alias support.

From-SVN: r274066

6 years agoDarwin, X86, testsuite, backport matching fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:40:16 +0000 (10:40 +0000)] 
Darwin, X86, testsuite, backport matching fixes.

Some of the i386.exp tests fail on Darwin (and at least one passes
incorrectly on Linux) because their scan-asm match strings are too
general.  In some cases the strings also match instances in the .file
and size directives or in comment output.  This patch makes the match
strings more specific.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pconfig-1.c: Scan for the string in the generated
code, not in comments or miscellaneous directives.
* gcc.target/i386/pr18041-1.c: Likewise.
* gcc.target/i386/pr18041-2.c: Likewise.
* gcc.target/i386/wbinvd-1.c: Likewise.
* gcc.target/i386/wbnoinvd-1.c: Likewise.
* gcc.target/i386/pr66819-3.c: Specifically, check that there is no
call to "bar".
* gcc.target/i386/pr66819-4.c: Likewise.
* gcc.target/i386/pr82662.c
* gcc.target/i386/ptwrite2.c: Make the checks look for the specific
destination register, don't try the m32 test on m64 targets.

From-SVN: r274065

6 years agoDarwin, X86, testsuite backport USER_LABEL_PREFIX fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:33:57 +0000 (10:33 +0000)] 
Darwin, X86, testsuite backport USER_LABEL_PREFIX fixes.

more tests that failed on Darwin because of missing
__USER_LABEL_PREFIX__ matching.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/pr67985-2.c: Adjust label checks for
Darwin.
* gcc.target/i386/pr77881.c: Likewise.

From-SVN: r274064

6 years agoDarwin, X86, backport test fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:29:37 +0000 (10:29 +0000)] 
Darwin, X86, backport test fixes.

Skip three tests that cannot pass on Darwin.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-24  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/i386/falign-functions-2.c: Skip for Darwin.
* gcc.target/i386/pr70738-7.c: Likewise.
* gcc.target/i386/pr24414.c: Likewise.

From-SVN: r274063

6 years agoDarwin, X86, backport fixes for 64895.
Iain Sandoe [Sun, 4 Aug 2019 10:24:34 +0000 (10:24 +0000)] 
Darwin, X86, backport fixes for 64895.

Although this is marked as rtl-optimisation, the Darwin
issue is that the testcase XPASS there since the codegen
is different.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>

PR rtl-optimisation/64895
* gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs.
* gcc.target/i386/fuse-caller-save.c: Likewise.
* gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for
PIC cases, remove XFAILs.

From-SVN: r274062

6 years agoDarwin, testsuite, backport for for 27221.
Iain Sandoe [Sun, 4 Aug 2019 10:11:53 +0000 (10:11 +0000)] 
Darwin, testsuite, backport for for 27221.

This can't pass on 32b power Darwin, since the ABI conflicts.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-22  Iain Sandoe  <iain@sandoe.co.uk>

PR testsuite/27221
* g++.dg/ext/alignof2.C: XFAIL for 32bit Darwin.

From-SVN: r274061

6 years agoDarwin, X86, backport testsuite fix for 67958.
Iain Sandoe [Sun, 4 Aug 2019 10:06:33 +0000 (10:06 +0000)] 
Darwin, X86, backport testsuite fix for 67958.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-21  Iain Sandoe  <iain@sandoe.co.uk>

PR testsuite/67958
* gcc.target/i386/pr32219-1.c: Adjust scan-asms for Darwin, comment
the differences.
* gcc.target/i386/pr32219-2.c: Likewise.
* gcc.target/i386/pr32219-3.c: Likewise.
* gcc.target/i386/pr32219-4.c: Likewise.
* gcc.target/i386/pr32219-5.c: Likewise.
* gcc.target/i386/pr32219-6.c: Likewise.
* gcc.target/i386/pr32219-7.c: Likewise.
* gcc.target/i386/pr32219-8.c: Likewise.

From-SVN: r274060

6 years agoDarwin, testsuite, backport fix for PR83891
Iain Sandoe [Sun, 4 Aug 2019 09:59:21 +0000 (09:59 +0000)] 
Darwin, testsuite, backport fix for PR83891

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-21  Iain Sandoe  <iain@sandoe.co.uk>

PR target/63891
* gcc.dg/darwin-weakimport-3.c: Adjust options and explain
the reasons.

From-SVN: r274059

6 years agoDarwin, X86, backport fix for PR58321.
Iain Sandoe [Sun, 4 Aug 2019 09:53:37 +0000 (09:53 +0000)] 
Darwin, X86, backport fix for PR58321.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-20  Iain Sandoe  <iain@sandoe.co.uk>

PR testsuite/58321
* gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and
add a comment as to the reason for the difference.
* gcc.target/i386/memset-strategy-1.c: Likewise.

From-SVN: r274058

6 years agoDarwin, ppc, backport fixes to exclude Darwin from VSX, power8 & 9.
Iain Sandoe [Sun, 4 Aug 2019 09:49:27 +0000 (09:49 +0000)] 
Darwin, ppc, backport fixes to exclude Darwin from VSX, power8 & 9.

This fixes a large number of test fails when we build PPC Darwin
with an LLVM-based assembler (that recognises the insns).

The patch augments the tests for feature support for VSX,
power8 and power9 to exclude Darwin even if the assembler can
handle the instructions.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>

* lib/target-supports.exp
(check_effective_target_powerpc_p8vector_ok): No support for Darwin.
(check_effective_target_powerpc_p9vector_ok): Likewise.
(check_effective_target_powerpc_float128_sw_ok): Likewise.
(check_effective_target_powerpc_float128_hw_ok): Likewise.
(check_effective_target_powerpc_vsx_ok): Likewise.
* gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin.
* gcc.target/powerpc/dfp/dfp.exp: Likewise.

From-SVN: r274057

6 years agoDarwin, ppc, backport testsuite fix for pr87600.
Iain Sandoe [Sun, 4 Aug 2019 09:39:02 +0000 (09:39 +0000)] 
Darwin, ppc, backport testsuite fix for pr87600.

This test fails because it was expecting __powerpc__ to be
defined, where Darwin defines __POWERPC__.

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-15  Iain Sandoe  <iain@sandoe.co.uk>
* gcc.dg/pr87600.h: Add __POWERPC__ as an alternate test
for PowerPC platforms.

From-SVN: r274056

6 years agoDaily bump.
GCC Administrator [Sun, 4 Aug 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274053

6 years agoObjective-C, backport fix for recognition of instancetype.
Iain Sandoe [Sat, 3 Aug 2019 20:21:44 +0000 (20:21 +0000)] 
Objective-C, backport fix for recognition of instancetype.

This addresses a number of test fails that occur for the
NeXT runtime.

gcc/objc/
2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* objc/objc-act.h (OCTI_INSTANCE_TYPE, OCTI_INSTANCETYPE_NAME): New.
(objc_global_trees): Add instance type and name.
(INSTANCE_TYPEDEF_NAME): New.
* objc/objc-act.c (synth_module_prologue): Build decls for
objc_instancetype_type and objc_instancetype_name.

gcc/testsuite/
2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* objc.dg/instancetype-0.m: New.

From-SVN: r274050

6 years agoDarwin, backport fix for PR87030
Iain Sandoe [Sat, 3 Aug 2019 20:16:22 +0000 (20:16 +0000)] 
Darwin, backport fix for PR87030

273746 , 273749, 273768 [Darwin] Fix PR87030 and tidy config fragments.

This is about 32/64b host and multilib support across the range of Darwin
systems.

Prior to Darwin8 (OS X 10.4), the toolchains support only PowerPC and only 32b.

On Darwin8 it is possible to target a 64b multilib, but with support limited
to a few of the main libraries on the system (not a recommended configuration).

From Darwin9 to Darwin17 (OSX 10.5 to 10.13) it is possible to have either
32 or 64b hosted toolchains, with support for a 64 or 32b multilib respectively.

On Darwin9 the kernel is 32b, but with support for 64b executables, so it's
conventional to build a 32b host toolchain supporting a 64b multilib. However
this is not enforced (merely a convention).

There is also some platform hardware supporting Darwin10/11 which is only 32b
and for which the same situation applies. However, from Darwin10 to Darwin17,
the majority of platform hardware supports a 64b kernel and it's conventional
to build a 64b host toolchain with support for a 32b multilib.

On/from Darwin18 (OS X 10.14), the development headers (in the SDK) no longer
expose the interfaces for the 32b multilib support (although sufficient runtime
support remains installed that the testsuite can be run for a 32b multilib).

The PR is raised against this latter situation since the absence of exposed
interfaces causes a 'default' bootstrap fail regardless of the availability of
the runtimes. Given the number of permutations, I felt it warranted a general
solution, especially since the current scheme of target headers and t-make
fragments has become somewhat messy.

The changes here enforce the single 32b PowerPC multilib for Darwin < 8 and the
single X86 64b multilib for Darwin >= 18. This means that there is no longer
any need to configure Darwin18+ '--disable-multilib', but also that if you want
to use the ability to continue to test the compiler's 32b multilib there, you
need to make a configuration targeting an earlier OS version (and using the
SDK from that).

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-07-24  Iain Sandoe  <iain@sandoe.co.uk>

PR bootstrap/87030
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Revert change from r273749.

PR bootstrap/87030
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move from here...
* config/i386/darwin32-biarch.h .. to here.
* config/i386/darwin64-biarch.h: Adjust comments.
* config/rs6000/darwin32-biarch.h: Likewise.
* config/rs6000/darwin64-biarch.h: Likewise.
* config.gcc: Missed commit from r273746
(*-*-darwin*): Don't include CPU t-darwin here.
(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
an error message if i686-darwin configuration is attempted for
Darwin >= 18.

Backport from mainline
2019-07-23  Iain Sandoe  <iain@sandoe.co.uk>

PR bootstrap/87030
* config.gcc (*-*-darwin*): Don't include CPU t-darwin here.
(i[34567]86-*-darwin*): Adjust to use biarch files. Produce
an error message if i686-darwin configuration is attempted for
Darwin >= 18.
(x86_64-*-darwin*): Switch to single multilib for Darwin >= 18.
(powerpc-*-darwin*): Use biarch files where needed.
(powerpc64-*-darwin*): Likewise.
* config/i386/darwin.h (REAL_LIBGCC_SPEC): Move to new biarch file.
(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
arch case.
* config/i386/darwin32-biarch.h: New.
* config/i386/darwin64.h: Rename.
* gcc/config/i386/darwin64-biarch.h: To this.
* config/i386/t-darwin: Rename.
* gcc/config/i386/t-darwin32-biarch: To this.
* config/i386/t-darwin64: Rename.
* gcc/config/i386/t-darwin64-biarch: To this.
* config/rs6000/darwin32-biarch.h: New.
* config/rs6000/darwin64.h: Rename.
* config/rs6000/darwin64-biarch.h: To this.
(DARWIN_ARCH_SPEC, DARWIN_SUBARCH_SPEC): Revise for default single
arch case.
* config/rs6000/t-darwin8: Rename.
* config/rs6000/t-darwin32-biarch: To this.
* config/rs6000/t-darwin64 Rename.
* config/rs6000/t-darwin64-biarch: To this.

From-SVN: r274049

6 years agoDarwin, backport codegen fix.
Iain Sandoe [Sat, 3 Aug 2019 20:05:21 +0000 (20:05 +0000)] 
Darwin, backport codegen fix.

Darwin only supports "static" code in the kernel and
kernel extensions.  This check tries to prevent the case
that cascaded PIC/PIE options on the command line cause
non-pic to be selected.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-07-07  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_override_options): Make a final check on PIC
options.

From-SVN: r274048

6 years agoDarwin, backport kext codegen fix.
Iain Sandoe [Sat, 3 Aug 2019 19:58:33 +0000 (19:58 +0000)] 
Darwin, backport kext codegen fix.

It's not correct for all current Darwin versions to jam
symbol stubs on for kexts.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-07-07  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_override_options): Don't jam symbol stubs
on for kernel code.

From-SVN: r274047

6 years agoDarwin, ppc, Fix test fails that depend on installed headers.
Iain Sandoe [Sat, 3 Aug 2019 19:53:51 +0000 (19:53 +0000)] 
Darwin, ppc, Fix test fails that depend on installed headers.

Several port tests use headers that Darwin has not been
installing.  This removes the override on the header install
thus making Darwin's set match the reset of the port.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-28  Iain Sandoe  <iain@sandoe.co.uk>

* config.gcc (powerpc-*-darwin*, powerpc64-*-darwin*): Remove
override on extra_headers.

From-SVN: r274046

6 years agoDarwin, ppc, backport fix for codegen in kexts.
Iain Sandoe [Sat, 3 Aug 2019 19:49:43 +0000 (19:49 +0000)] 
Darwin, ppc, backport fix for codegen in kexts.

This honours the users choice of float ABI in kexts.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour
user-specified float mode choice for kernel mode code.

From-SVN: r274045

6 years agoDarwin, ppc, backport wrong code fix.
Iain Sandoe [Sat, 3 Aug 2019 19:44:13 +0000 (19:44 +0000)] 
Darwin, ppc, backport wrong code fix.

We should never have been using longcalls by default in
64b code.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
use longcall for 64b code.

From-SVN: r274044

6 years agoDarwin, ppc, backport build fix for unwinder.
Iain Sandoe [Sat, 3 Aug 2019 19:36:37 +0000 (19:36 +0000)] 
Darwin, ppc, backport build fix for unwinder.

When libgcc is built on Darwin, it is usually built for the earliest potential
target (Darwin8, 10.4). Build for that revision default to assuming that the
processor might be G3 (without vector ops) and there is an outlined function
used for save/restore that checks whether the processor is G3 or G4+ at run-
time. However, the unwinder itself needs to be built with the assumption of
vector usage so that the relevant outlined functions are called.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-06  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/t-darwin: Ensure that the unwinder is built with
altivec enabled.

From-SVN: r274043

6 years agoDarwin, ppc, backport test fixes.
Iain Sandoe [Sat, 3 Aug 2019 19:32:18 +0000 (19:32 +0000)] 
Darwin, ppc, backport test fixes.

Several tests expect support for the GCC target pragma.
Act on this for compatibility with the port.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h: Handle GCC target pragma.

From-SVN: r274042

6 years agoDarwin, ppc, backport test fixes.
Iain Sandoe [Sat, 3 Aug 2019 19:25:05 +0000 (19:25 +0000)] 
Darwin, ppc, backport test fixes.

Some tests expect upper case versions of the ppc/ppc64
macros, so bring Darwin into line with other port
members.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin.h: (__PPC__, __PPC64__): New.

From-SVN: r274041

6 years agoDarwin, fixincludes - backport fixes Darwin9/10 math.h issues.
Iain Sandoe [Sat, 3 Aug 2019 19:21:08 +0000 (19:21 +0000)] 
Darwin, fixincludes - backport fixes Darwin9/10 math.h issues.

Darwin has had long long functions for some considerable time and these are
exposed in Darwin8 and Darwin11+ headers. However, for some reason it was
elected to hide them behind __STRICT_ANSI__ and __STDC_VERSION__ on Darwin9
and Darwin10. This is a problem for G++/libstdc++ that expects the functions
to be available for strict ansi (-std=c++14, for example) and without
defining __STDC_VERSION__. The fix here follows the pattern used in
Darwin11+ headers where the functions may be explicitly hidden by defining
__DARWIN_NO_LONG_LONG.

This fixes the tr1 testsuite fails seen on Darwin9 and 10.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-21  Iain Sandoe  <iain@sandoe.co.uk>

* inclhack.def: Replace the complex test using __STRICT_ANSI__ and
__STDC_VERSION__ with a test using __DARWIN_NO_LONG_LONG.
Ensure that the top level math.h uses <> to wrap included headers
rather than "".
* fixincl.x: Regenerated.
* tests/base/architecture/ppc/math.h: Update test to include the
__DARWIN_NO_LONG_LONG case.

From-SVN: r274040

6 years agoDarwin, fixincludes - backport build fixes.
Iain Sandoe [Sat, 3 Aug 2019 19:11:05 +0000 (19:11 +0000)] 
Darwin, fixincludes - backport build fixes.

There are two issues with the Darwin14 (SDK) headers in which unguarded
advanced syntax elements causes any code including these headers to fail.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-21  Iain Sandoe  <iain@sandoe.co.uk>

* inclhack.def: Guard __has_attribute and __has_extension in
os/base.h.
Guard Apple blocks syntax in dispatch/object.h.
* fixincl.x: Regenerate.
* tests/base/dispatch/object.h: New file.
* tests/base/os/base.h: New file.

From-SVN: r274039

6 years agoDaily bump.
GCC Administrator [Sat, 3 Aug 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274036

6 years agobackport: PR c/90737 - [8/9/10 Regression] inconsistent address of a local converted...
Martin Sebor [Fri, 2 Aug 2019 17:05:34 +0000 (17:05 +0000)] 
backport: PR c/90737 - [8/9/10 Regression] inconsistent address of a local converted to intptr_t between callee and caller

Backport from mainline

PR c/90737 - [8/9/10 Regression] inconsistent address of a local converted to intptr_t between callee and caller

gcc/c/ChangeLog:

PR c/90737
* c-typeck.c (c_finish_return): Only consider functions returning
pointers as candidates for -Wreturn-local-addr.

gcc/cp/ChangeLog:

PR c/90737
* typeck.c (maybe_warn_about_returning_address_of_local): Only
consider functions returning pointers as candidates for
-Wreturn-local-addr.

gcc/testsuite/ChangeLog:

PR c/90737
* c-c++-common/Wreturn-local-addr.c: New test.
* g++.dg/warn/Wreturn-local-addr-6.C: New test.

From-SVN: r274022

6 years agobackport: PR tree-optimization/90989 - incorrrect strlen result after second strcpy
Martin Sebor [Fri, 2 Aug 2019 16:57:19 +0000 (16:57 +0000)] 
backport: PR tree-optimization/90989 - incorrrect strlen result after second strcpy

Backport from mainline

PR tree-optimization/90989 - incorrrect strlen result after second strcpy
into the same destination

gcc/ChangeLog:

PR tree-optimization/90989
* tree-ssa-strlen.c (handle_char_store): Constrain a single character
optimization to just single character stores.

gcc/testsuite/ChangeLog:

PR tree-optimization/90989
* gcc.dg/strlenopt-26.c: Exit with test result status.
* gcc.dg/strlenopt-67.c: New test.

From-SVN: r274021

6 years agodarwin, backport driver fixes.
Iain Sandoe [Fri, 2 Aug 2019 14:54:57 +0000 (14:54 +0000)] 
darwin, backport driver fixes.

272260,r272479 - Darwin, Driver - Improve processing of macosx-version-min=

For PR target/63810 some improvements were made in the parsing of
the version string at the point it's used to define the built-in
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__. This is fine, but the
specs processing also uses the version, and specs version-compare
doesn't like leading zeros on components. This means that while we
succeed in processing -mmacosx-version-min=010.00002.000099 on compile
lines, it fails for any other line that uses the value as part of a spec
(in particular, link lines fail).

To fix this, we need to apply a bit of clean-up to the version that's
presented to the driver, and push that back into the command line opts.

The value can come from four places:
1. User-entered on the command line
2. User-entered as MACOSX_DEPLOYMENT_TARGET= environment var.
3. Absent those two
3a For self-hosting systems, look-up from the kernel
3b For cross-compilers, as a default supplied at configure time.

We apply the clean-up to all 4 (although it shouldn't really be needed
for the cases under 3).

We also supply a test-case that adapts to the target-version of the
system, so that the link requirements are met by the SDK in use (if you
try to link i686-darwin9 on an x86-64-darwin18 SDK, it will fail).

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-19  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-driver.c (darwin_driver_init): Fix off-by-one errors
in computing the number of options to be moved.

Backport from mainline
2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-driver.c (validate_macosx_version_min): New.
(darwin_default_min_version): Cleanup and validate supplied version.
(darwin_driver_init): Likewise and push cleaned version into opts.

gcc/testsuite/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/darwin-minversion-link.c: New test.

From-SVN: r274017

6 years agodarwin, x86, backport fix for missing .p2align.
Iain Sandoe [Fri, 2 Aug 2019 14:44:23 +0000 (14:44 +0000)] 
darwin, x86, backport fix for missing .p2align.

This fixes a number of testcases that expect use of
.p2align, which was omitted from the darwin X86 port
(but is available in all assemblers used with that).

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>

* config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New.

From-SVN: r274016

6 years agodarwin, objc, backport fix for objc header paths
Iain Sandoe [Fri, 2 Aug 2019 14:34:02 +0000 (14:34 +0000)] 
darwin, objc, backport fix for objc header paths

Don't try to prepend a sysroot for the gnu-objc headers, which
are compiler-relative.

Darwin is able to use two runtimes for objective-c; the
default is its native "NeXT" runtime, but also it can build
code using the "gnu-runtime". In order to do this, we have to
be able to find the gnu-runtime headers (which are installed
into the compiler's tree).

The process to do this is erroneously prepending the sysroot
to this when a sysroot is in force. The gnu-runtime headers have
never been installed in a Darwin (macOS) SDK so we must make
sure that they are found local to the compiler.

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-c.c (darwin_register_objc_includes): Do not
prepend the sysroot when building gnu-runtime header search
paths.

From-SVN: r274015

6 years agodarwin, backport fix for objc section switches.
Iain Sandoe [Fri, 2 Aug 2019 14:25:04 +0000 (14:25 +0000)] 
darwin, backport fix for objc section switches.

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_file_end): Use switch_to_section ()
instead of direct output of the asm.

From-SVN: r274014

6 years agoDarwin, ppc, backport build fix.
Iain Sandoe [Fri, 2 Aug 2019 14:19:42 +0000 (14:19 +0000)] 
Darwin, ppc, backport build fix.

libgcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin-vecsave.S: Set .machine appropriately.

From-SVN: r274013

6 years agoPR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.
Marek Polacek [Fri, 2 Aug 2019 13:29:05 +0000 (13:29 +0000)] 
PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.

* pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__
inside a template function value-dependent.

* g++.dg/cpp1y/lambda-generic-pretty1.C: New test.

From-SVN: r274010

6 years agobackport: re PR tree-optimization/91280 (ICE in get_constraint_for_component_ref...
Richard Biener [Fri, 2 Aug 2019 12:07:33 +0000 (12:07 +0000)] 
backport: re PR tree-optimization/91280 (ICE in get_constraint_for_component_ref, at tree-ssa-structalias.c:3259 since r260354)

2019-08-02  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91280
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Decompose MEM_REF manually for offset handling.

* g++.dg/torture/pr91280.C: New testcase.

2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91293
* tree-vect-slp.c (vect_build_slp_tree_2): Do not swap operands
of reduction stmts.

* gcc.dg/vect/pr91293-1.c: New testcase.
* gcc.dg/vect/pr91293-2.c: Likewise.
* gcc.dg/vect/pr91293-3.c: Likewise.

From-SVN: r274007

6 years agobackport: [multiple changes]
Richard Biener [Fri, 2 Aug 2019 08:40:34 +0000 (08:40 +0000)] 
backport: [multiple changes]

2019-08-02  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Use tail-recursion.

* gcc.dg/torture/pr91178-2.c: New testcase.

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-ssa.c (release_defs_bitset): Iterate from higher to
lower SSA names to avoid quadratic behavior in the common case.
* tree-data-ref.c (split_constant_offset): Add limit argument
and pass it down.  Initialize it from PARAM_SSA_NAME_DEF_CHAIN_LIMIT.
(split_constant_offset_1): Add limit argument and use it to
limit SSA def walking.  Optimize the common plus/minus case.

* gcc.dg/torture/pr91178.c: New testcase.

2019-07-12  Martin Sebor  <msebor@redhat.com>

* doc/invoke.texi (ssa-name-def-chain-limit): Document new --param.
* params.def (PARAM_SSA_NAME_DEF_CHAIN_LIMIT): Add new --param.
* tree-vrp.c (vrp_prop::check_mem_ref): Use
PARAM_SSA_NAME_DEF_CHAIN_LIMIT.

* gcc.dg/Warray-bounds-43.c: New test.

From-SVN: r274000

6 years agoDaily bump.
GCC Administrator [Fri, 2 Aug 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273992

6 years agobackport: re PR c/91192 (non-deterministic ICE on invalid)
Jakub Jelinek [Thu, 1 Aug 2019 06:31:54 +0000 (08:31 +0200)] 
backport: re PR c/91192 (non-deterministic ICE on invalid)

Backported from mainline
2019-07-31  Jakub Jelinek  <jakub@redhat.com>

PR c/91192
* c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
even if finish is UNKNOWN_LOCATION, just use start as finish in that
case.

From-SVN: r273967

6 years agobackport: re PR middle-end/91301 (ICE in omp_add_variable on random access iterator...
Jakub Jelinek [Thu, 1 Aug 2019 06:31:20 +0000 (08:31 +0200)] 
backport: re PR middle-end/91301 (ICE in omp_add_variable on random access iterator distribute parallel for private (iterator))

Backported from mainline
2019-07-31  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91301
* gimplify.c (gimplify_omp_for): If for class iterator on
distribute parallel for there is no data sharing clause
on inner_for_stmt, look for private clause on combined
parallel too and if found, move it to inner_for_stmt.

* testsuite/libgomp.c++/for-27.C: New test.

From-SVN: r273966

6 years agobackport: re PR middle-end/91216 (OpenMP ICE starting with r265930)
Jakub Jelinek [Thu, 1 Aug 2019 06:30:26 +0000 (08:30 +0200)] 
backport: re PR middle-end/91216 (OpenMP ICE starting with r265930)

Backported from mainline
2019-07-30  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91216
* omp-low.c (global_nonaddressable_vars): New variable.
(use_pointer_for_field): For global decls, if they are non-addressable,
remember it in the global_nonaddressable_vars bitmap, if they are
addressable and in the global_nonaddressable_vars bitmap, ignore their
TREE_ADDRESSABLE bit.
(omp_copy_decl_2): Clear TREE_ADDRESSABLE also on private copies of
vars in global_nonaddressable_vars bitmap.
(execute_lower_omp): Free global_nonaddressable_vars bitmap.

* gcc.dg/gomp/pr91216.c: New test.

From-SVN: r273965

6 years agobackport: re PR target/91150 (wrong code with -O -mavx512vbmi due to wrong writemask)
Jakub Jelinek [Thu, 1 Aug 2019 06:29:22 +0000 (08:29 +0200)] 
backport: re PR target/91150 (wrong code with -O -mavx512vbmi due to wrong writemask)

Backported from mainline
2019-07-30  Jakub Jelinek  <jakub@redhat.com>

PR target/91150
* config/i386/i386.c (expand_vec_perm_blend): Change mask type
from unsigned to unsigned HOST_WIDE_INT.  For E_V64QImode cast
comparison to unsigned HOST_WIDE_INT before shifting it left.

* gcc.target/i386/avx512bw-pr91150.c: New test.

From-SVN: r273964

6 years agobackport: re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position...
Jakub Jelinek [Thu, 1 Aug 2019 06:28:19 +0000 (08:28 +0200)] 
backport: re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref'))

Backported from mainline
2019-07-17  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91157
* tree-vect-generic.c (expand_vector_comparison): Handle lhs being
a vector boolean with scalar mode.
(expand_vector_condition): Handle first operand being a vector boolean
with scalar mode.
(expand_vector_operations_1): For comparisons, don't bail out early
if the return type is vector boolean with scalar mode, but comparison
operand type is not.

* gcc.target/i386/avx512f-pr91157.c: New test.
* gcc.target/i386/avx512bw-pr91157.c: New test.

From-SVN: r273963

6 years ago[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64
Alan Modra [Thu, 1 Aug 2019 05:57:12 +0000 (15:27 +0930)] 
[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64

This patch makes the obvious fix for PR91135, and deletes extraneous
copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h
and rs6000/linux64.h.  Since all configurations using either of these
files also include linux.h there is no need to duplicate the macro.

PR target/91135
* config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't
define.
* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke
GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi.
(GNU_USER_TARGET_D_OS_VERSIONS): Don't define.

From-SVN: r273962

6 years agoDaily bump.
GCC Administrator [Thu, 1 Aug 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273959

6 years agoUse standard <float.h> macros in test
Jonathan Wakely [Wed, 31 Jul 2019 19:56:19 +0000 (20:56 +0100)] 
Use standard <float.h> macros in test

The <float.h> changes to define these for C++ have been backported, so
the test can use them now.

* testsuite/26_numerics/midpoint/floating.cc: Use standard macros
instead of GCC-specific ones.

From-SVN: r273950

6 years agoDefine C11 macros such as FLT_DECIMAL_DIG for C++17
Jonathan Wakely [Wed, 31 Jul 2019 19:56:16 +0000 (20:56 +0100)] 
Define C11 macros such as FLT_DECIMAL_DIG for C++17

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG)
(FLT_HAS_SUBNORM, DBL_HAS_SUBNORM, LDBL_HAS_SUBNORM, FLT_TRUE_MIN)
(DBL_TRUE_MIN, LDBL_TRUE_MIN): Also define for C++17.

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/18_support/headers/cfloat/values_c++17.cc: New test.

From-SVN: r273949

6 years agoQualify call to prevent ADL
Jonathan Wakely [Wed, 31 Jul 2019 19:56:12 +0000 (20:56 +0100)] 
Qualify call to prevent ADL

Backport from mainline
2019-07-31  Jonathan Wakely  <jwakely@redhat.com>

* include/std/memory (make_obj_using_allocator): Qualify call to
uses_allocator_construction_args.

From-SVN: r273948

6 years agoPR libstdc++/91308 fix constraints on unique_ptr assignment
Jonathan Wakely [Wed, 31 Jul 2019 19:56:08 +0000 (20:56 +0100)] 
PR libstdc++/91308 fix constraints on unique_ptr assignment

Backport from mainline
2019-07-31  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/91308
* include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
constraints on deleter that should only apply to the constructor.
(unique_ptr<T[], D>::__safe_conversion_up): Likewise.
(unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
constraints on deleter here.
* testsuite/20_util/unique_ptr/assign/91308.cc: New test.

From-SVN: r273947

6 years agoPR libstdc++/51333 Define recursive_init_error constructor non-inline
Jonathan Wakely [Wed, 31 Jul 2019 19:56:04 +0000 (20:56 +0100)] 
PR libstdc++/51333 Define recursive_init_error constructor non-inline

The recursive_init_error class is defined in a header, with an inline
constructor, but the definition of the vtable and destructor are not
exported from the shared library. With -fkeep-inline-functions the
constructor gets emitted in user code, and requires the (non-exported)
vtable. This fails to link.

As far as I can tell, the recursive_init_error class definition was
moved into <cxxabi.h> so it could be documented with Doxygen, not for
any technical reason. But now it's there (and documented), somebody
could be relying on it, by catching that type and possibly performing
derived-to-base conversions to the std::exception base class. So the
conservative fix is to leave the class definition in the header but make
the constructor non-inline. This still allows the type to be caught and
still defines its base class.

Backport from mainline
2019-07-29  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/51333
* libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
constructor inline.
* libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
constructor.
* testsuite/18_support/51333.cc: New test.

From-SVN: r273946

6 years agoBackport PRs 91126, 91131, 91145, 91162, 91200
Richard Biener [Wed, 31 Jul 2019 15:40:36 +0000 (15:40 +0000)] 
Backport PRs 91126, 91131, 91145, 91162, 91200

2019-07-31  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.

* gcc.dg/torture/pr91200.c: New testcase.

2019-07-15  Richard Biener  <rguenther@suse.de>

PR middle-end/91162
* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
node make sure to replace all uses with something valid.

* gcc.dg/autopar/pr91162.c: New testcase.

2019-07-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91145
* tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction
chain check.

* gcc.dg/torture/pr91145.c: New testcase.

2019-07-11  Richard Biener  <rguenther@suse.de>

PR middle-end/91131
* gimplify.c (gimplify_compound_literal_expr): Force a temporary
when the object is volatile and we have not cleared it even though
there are no nonzero elements.

* gcc.target/i386/pr91131.c: New testcase.

2019-07-10  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91126
* tree-ssa-sccvn.c (n_walk_cb_data::push_partial_def): Adjust
native encoding offset for BYTES_BIG_ENDIAN.
(vn_reference_lookup_3): Likewise.

* gcc.dg/torture/pr91126.c: New testcase.

From-SVN: r273939

6 years agoDaily bump.
GCC Administrator [Wed, 31 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273919

6 years agore PR fortran/91296 (ICE when passing complex number %re/%im as a procedure argument...
Steven G. Kargl [Tue, 30 Jul 2019 21:38:48 +0000 (21:38 +0000)] 
re PR fortran/91296 (ICE when passing complex number %re/%im as a procedure argument with -Waliasing.)

2019-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91296
* interface.c (compare_actual_expr): When checking for aliasing, add
a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).

2019-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91296
* gfortran.dg/pr91296.f90: New test.

From-SVN: r273916

6 years agobackport: re PR fortran/90786 (ICE on procedure pointer assignment to function with...
Thomas Koenig [Tue, 30 Jul 2019 19:11:03 +0000 (19:11 +0000)] 
backport: re PR fortran/90786 (ICE on procedure pointer assignment to function with class pointer result)

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
it is very simple and only called from one place.
(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
as non_proc_ptr_assign. Assign to it directly, rather than call
to above, deleted function and use gfc_expr_attr instead of
only checking the reference chain.
* dump-parse-tree.c (show_global_symbol): New function.
(gfc_dump_global_symbols): New function.
* gfortran.h (gfc_traverse_gsymbol): Add prototype.
(gfc_dump_global_symbols): Likewise.
* invoke.texi: Document -fdump-fortran-global.
* lang.opt: Add -fdump-fortran-global.
* parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
* symbol.c (gfc_traverse_gsymbol): New function.
* trans-decl.c (sym_identifier): New function.
(mangled_identifier): New function, doing most of the work
of gfc_sym_mangled_identifier.
(gfc_sym_mangled_identifier): Use mangled_identifier.  Add mangled
identifier to global symbol table.
(get_proc_pointer_decl): Use backend decl from global identifier
if present.

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* gfortran.dg/proc_ptr_51.f90: New test.

Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r273913

6 years agobackport: i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.
Jan Hubicka [Tue, 30 Jul 2019 09:28:13 +0000 (11:28 +0200)] 
backport: i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.
* config/i386/znver1.md: Enable patterns for znver2 and add store
variants which use extra AGU unit.

From-SVN: r273904

6 years agobackport: i386.c (ix86_option_override_internal): Default PARAM_AVOID_FMA_MAX_BITS...
Jan Hubicka [Tue, 30 Jul 2019 08:10:22 +0000 (10:10 +0200)] 
backport: i386.c (ix86_option_override_internal): Default PARAM_AVOID_FMA_MAX_BITS to 256 for znver2.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* config/i386/i386.c (ix86_option_override_internal): Default
PARAM_AVOID_FMA_MAX_BITS to 256 for znver2.
* config/i386/x86-tune.def (X86_TUNE_AVOID_256FMA_CHAINS): Set
for ZNVER2.

From-SVN: r273901

6 years agobackport: x86-tune-costs.h (znver2_memcpy): Update.
Jan Hubicka [Tue, 30 Jul 2019 08:03:43 +0000 (10:03 +0200)] 
backport: x86-tune-costs.h (znver2_memcpy): Update.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* config/i386/x86-tune-costs.h (znver2_memcpy): Update.
(znver2_costs): Update 256 bit SSE costs and multiplication.

From-SVN: r273900

6 years agoDaily bump.
GCC Administrator [Tue, 30 Jul 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273895

6 years agoDaily bump.
GCC Administrator [Mon, 29 Jul 2019 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273863

6 years agoDaily bump.
GCC Administrator [Sun, 28 Jul 2019 00:16:55 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273849

6 years agoDaily bump.
GCC Administrator [Sat, 27 Jul 2019 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273842

6 years agoDefine __cpp_lib_endian feature test macro
Jonathan Wakely [Fri, 26 Jul 2019 13:37:00 +0000 (14:37 +0100)] 
Define __cpp_lib_endian feature test macro

This macro was added as part of moving std::endian from <type_traits> to
<bit>.

Backport from mainline
2019-07-26  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__cpp_lib_endian): Define.
* include/std/version (__cpp_lib_endian): Define.
* testsuite/26_numerics/endian/2.cc: New.
* testsuite/26_numerics/endian/3.cc: New.
* testsuite/26_numerics/endian/4.cc: New.

From-SVN: r273838

6 years agoRelocate std::endian from <type_traits> to <bit>
Jonathan Wakely [Fri, 26 Jul 2019 13:36:56 +0000 (14:36 +0100)] 
Relocate std::endian from <type_traits> to <bit>

This change to an early C++2a feature was just approved (P1612R1).

Backport from mainline
2019-07-25  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (endian): Move definition here as per P1612R1.
* include/std/type_traits (endian): Remove definition from here.
* testsuite/20_util/endian/1.cc: Rename to ...
* testsuite/26_numerics/endian/1.cc: ... here. Adjust header.

From-SVN: r273837

6 years agoAdjust std::rotl, std::rotr etc to match final P0553R4 proposal
Jonathan Wakely [Fri, 26 Jul 2019 13:36:52 +0000 (14:36 +0100)] 
Adjust std::rotl, std::rotr etc to match final P0553R4 proposal

This proposal has now been accepted for C++20, with a few changes. This
patch adjusts std::rotl and std::rotr to match the final specification
and declares the additions for C++2a mode even when __STRICT_ANSI__ is
defined.

Backport from mainline
2019-07-22  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__rotl, __rotr): Change second parameter from
unsigned int to int and handle negative values.
(rotl, rotr): Remove check for __STRICT_ANSI__. Change second
parameter from unsigned int to int. Add nodiscard attribute.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
shifts.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
* testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
shifts.

From-SVN: r273836

6 years agoChange std::ceil2 to be undefined if the result can't be represented
Jonathan Wakely [Fri, 26 Jul 2019 13:36:47 +0000 (14:36 +0100)] 
Change std::ceil2 to be undefined if the result can't be represented

Backport from mainline
2019-07-22  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__ceil2): Make unrepresentable results undefined,
as per P1355R2. Add debug assertion. Perform one left shift, not two,
so that out of range values cause undefined behaviour. Ensure that
shift will still be undefined if left operand is promoted.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
unrepresentable values with checks that they are not core constant
expressions.
* testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.

From-SVN: r273835

6 years agoRemove std::byte overloads from <bit>
Jonathan Wakely [Fri, 26 Jul 2019 13:36:44 +0000 (14:36 +0100)] 
Remove std::byte overloads from <bit>

The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.

Backport from mainline (partial)
2019-06-26  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (rotl(byte, unsigned), rotr(byte, unsigned))
(countl_zero(byte), countl_one(byte), countr_zero(byte))
(countr_one(byte), popcount(byte), ispow2(byte), ceil2(byte))
(floor2(byte), log2p1(byte)): Remove.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
std::byte overload.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.

From-SVN: r273834

6 years agoAdd parens around constraint in <memory>.
Jonathan Wakely [Fri, 26 Jul 2019 13:36:39 +0000 (14:36 +0100)] 
Add parens around constraint in <memory>.

C++20 concepts require parens around atomic constraints that are not
primary-expressions.

Backport from mainline
2019-07-16  Jason Merrill  <jason@redhat.com>

* include/std/memory (uses_allocator_construction_args): Add parens
around constraint.

From-SVN: r273833

6 years agoFix preprocessor checks for Clang builtins
Jonathan Wakely [Fri, 26 Jul 2019 13:36:36 +0000 (14:36 +0100)] 
Fix preprocessor checks for Clang builtins

Clang seems to define built-ins that start with "__builtin_" as
non-keywords, which means that we need to use __has_builtin to detect
them, not __is_identifier. The built-ins that don't start with
"__builtin_" are keywords, and can only be detected using
__is_identifier and not by __has_builtin.

Backport from mainline
2019-07-02  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
instead of __is_identifier to detect Clang support.

From-SVN: r273832

6 years agoAdd missing feature test macro to C++17 status table
Jonathan Wakely [Fri, 26 Jul 2019 13:36:33 +0000 (14:36 +0100)] 
Add missing feature test macro to C++17 status table

Backport from mainline
2019-05-23  Jonathan Wakely  <jwakely@redhat.com>

* doc/xml/manual/status_cxx2017.xml: Add feature test macro for
P0040R3.
* doc/html/*: Regenerate.

From-SVN: r273831

6 years agoFix outdated reference to C++17 draft in the docs
Jonathan Wakely [Fri, 26 Jul 2019 13:36:29 +0000 (14:36 +0100)] 
Fix outdated reference to C++17 draft in the docs

Backport from mainline
2019-06-20  Jonathan Wakely  <jwakely@redhat.com>

* doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
C++17 working draft.

From-SVN: r273830

6 years agoFix std::midpoint for denormal values
Jonathan Wakely [Fri, 26 Jul 2019 13:36:25 +0000 (14:36 +0100)] 
Fix std::midpoint for denormal values

Backport from mainline
2019-06-25  Jonathan Wakely  <jwakely@redhat.com>

* include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
function.

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* include/std/numeric (midpoint(T, T)): Change implementation for
floating-point types to avoid incorrect rounding of denormals.
* testsuite/26_numerics/midpoint/floating.cc: Add check for correct
rounding with denormals.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.

From-SVN: r273829

6 years agoDaily bump.
GCC Administrator [Fri, 26 Jul 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273822

6 years agore PR plugins/90924 (lto-plugin/lto-plugin.c heap memory corruption due to insufficie...
Richard Biener [Thu, 25 Jul 2019 10:46:54 +0000 (10:46 +0000)] 
re PR plugins/90924 (lto-plugin/lto-plugin.c heap memory corruption due to insufficient sanitization.)

2019-07-25  Richard Biener  <rguenther@suse.de>

PR lto/90924
Backport from mainline
2019-07-12  Ren Kimura  <rkx1209dev@gmail.com>

* simple-object-elf.c (simple_object_elf_match): Check zero value
shstrndx.

From-SVN: r273793

6 years agoDaily bump.
GCC Administrator [Thu, 25 Jul 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273781

6 years agoFixup ChangeLog entry for revision 273754.
Bin Cheng [Wed, 24 Jul 2019 01:32:59 +0000 (01:32 +0000)] 
Fixup ChangeLog entry for revision 273754.

From-SVN: r273755

6 years agobackport: re PR tree-optimization/91137 (Wrong code with -O3)
Bin Cheng [Wed, 24 Jul 2019 01:28:33 +0000 (01:28 +0000)] 
backport: re PR tree-optimization/91137 (Wrong code with -O3)

        Backport from mainline
        2019-07-18  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
        (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
        Init, use and fini the above new field.
        (determine_base_object_1): New function.
        (determine_base_object): Reimplement using walk_tree.

gcc/testsuite
        2019-07-18  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * gcc.c-torture/execute/pr91137.c: New test.

From-SVN: r273754

6 years agoDaily bump.
GCC Administrator [Wed, 24 Jul 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273752

6 years agore PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)
Matthew Beliveau [Tue, 23 Jul 2019 15:56:22 +0000 (15:56 +0000)] 
re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)

PR rtl-optimization/91173

Backported from mainline
2019-07-16  Jeff Law  <law@redhat.com>

PR rtl-optimization/91173
* tree-ssa-address.c (addr_for_mem_ref): If the base is an
SSA_NAME with a constant value, fold its value into the offset
and clear the base before calling gen_addr_rtx.
* g++.dg/pr91173.C: New test.

From-SVN: r273741

6 years agore PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)
Richard Biener [Tue, 23 Jul 2019 11:17:37 +0000 (11:17 +0000)] 
re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)

2019-07-23  Richard Biener  <rguenther@suse.de>

PR debug/91231
* lto-streamer-in.c (input_function): Drop inline-entry markers
that ended up with an unknown location block.

From-SVN: r273734

6 years agobackport: re PR libfortran/91030 (Poor performance of I/O -fconvert=big-endian)
Thomas Koenig [Tue, 23 Jul 2019 08:57:45 +0000 (08:57 +0000)] 
backport: re PR libfortran/91030 (Poor performance of I/O -fconvert=big-endian)

2019-07-23  Thomas König  <tkoenig@gcc.gnu.org>

Backport from trunk
PR libfortran/91030
* gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document.
(GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.

2019-07-23  Thomas König  <tkoenig@gcc.gnu.org>

Backport from trunk
PR libfortran/91030
* io/unix.c (BUFFER_SIZE): Delete.
(BUFFER_FORMATTED_SIZE_DEFAULT): New variable.
(BUFFER_UNFORMATTED_SIZE_DEFAULT): New variable.
(unix_stream): Add buffer_size.
(buf_read): Use s->buffer_size instead of BUFFER_SIZE.
(buf_write): Likewise.
(buf_init): Add argument unformatted.  Handle block sizes
for unformatted vs. formatted, using defaults if provided.
(fd_to_stream): Add argument unformatted in call to buf_init.
* libgfortran.h (options_t): Add buffer_size_formatted and
buffer_size_unformatted.
* runtime/environ.c (variable_table): Add
GFORTRAN_UNFORMATTED_BUFFER_SIZE and
GFORTRAN_FORMATTED_BUFFER_SIZE.

From-SVN: r273727