]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agoUpdate ChangeLog and version files for release releases/gcc-9.2.0
Jakub Jelinek [Mon, 12 Aug 2019 07:38:49 +0000 (09:38 +0200)] 
Update ChangeLog and version files for release

From-SVN: r274274

5 years agoDaily bump.
GCC Administrator [Mon, 12 Aug 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274271

5 years agoDaily bump.
GCC Administrator [Sun, 11 Aug 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274260

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

From-SVN: r274247

5 years ago* zh_TW.po: Update.
Joseph Myers [Fri, 9 Aug 2019 22:02:27 +0000 (23:02 +0100)] 
* zh_TW.po: Update.

From-SVN: r274244

5 years ago* uk.po: Update.
Joseph Myers [Fri, 9 Aug 2019 22:00:57 +0000 (23:00 +0100)] 
* uk.po: Update.

From-SVN: r274242

5 years agoDaily bump.
GCC Administrator [Fri, 9 Aug 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274223

5 years agoDaily bump.
GCC Administrator [Thu, 8 Aug 2019 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274204

6 years agoDaily bump.
GCC Administrator [Wed, 7 Aug 2019 00:16:23 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274154

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

From-SVN: r274133

6 years agoAda, Darwin, PPC, backport fix for stack check probes.
Iain Sandoe [Mon, 5 Aug 2019 08:12:23 +0000 (08:12 +0000)] 
Ada, Darwin, PPC, backport fix for stack check probes.

On PPC, Darwin uses the same code as other parts of the port.

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

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

* libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
PPC Darwin.

From-SVN: r274111

6 years agoAda, backport push -shared-libgcc where needed.
Iain Sandoe [Mon, 5 Aug 2019 08:09:34 +0000 (08:09 +0000)] 
Ada, backport push -shared-libgcc where needed.

Gnatlink has code that checks for duplicate '-shared-libgcc’ switches (but not
duplicate ‘static-libgcc’) and also pushes ’static-libgcc' onto the link line for
targets that default to static linking, provided '-shared-libgcc' is not present.

For targets that should use a shared libgcc we need the same process to be
applied (in inverse), in the event that they do not default to providing the
shared flag implicitly.

So this adds the complementary set of tests for the shared case and pushes
the shared flag as needed. As a minor tidy-up there’s no need push duplicates
of the libgcc switch onto the link line when one has already been seen (given by
the user).

The patch does not alter any of the platform defaults for static/shared libgcc,
but it ensures that the intent of the link is explicit.

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

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

* gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
Push -shared-libgcc explicitly, when it is the target default (unless
overidden by the static flag).
When the user has put an instance of shared/static-libgcc do not push
a duplicate of this.

From-SVN: r274110

6 years agoRISC-V: Promote type correctly for libcalls
Kito Cheng [Mon, 5 Aug 2019 07:54:31 +0000 (07:54 +0000)] 
RISC-V: Promote type correctly for libcalls

 - argument and return value for libcall won't promote at
   default_promote_function_mode_always_promote, however we expect it
   should sign-extend as normal function.

 - Witout this patch, this test case will fail at -march=rv64i -mabi=lp64.

 - The implementation of riscv_promote_function_mode is borrowed from MIPS.

gcc/ChangeLog

Backport from mainline
2019-08-05  Kito Cheng  <kito.cheng@sifive.com>

* config/riscv/riscv.c (riscv_promote_function_mode): New.
(TARGET_PROMOTE_FUNCTION_MODE): Use riscv_promote_function_mode.

gcc/testsuite/ChangeLog

Backport from mainline
2019-08-05  Kito Cheng  <kito.cheng@sifive.com>

* gcc.target/riscv/promote-type-for-libcall.c: New.

From-SVN: r274108

6 years agoPR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE
Alan Modra [Mon, 5 Aug 2019 01:53:31 +0000 (11:23 +0930)] 
PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE

rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h
but missed doing the same in rs6000/freebsd64.h.

PR target/91349
* config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.

From-SVN: r274106

6 years agobackport: re PR fortran/87233 (Constraint C1279 still followed after f2008 standard...
Jerry DeLisle [Mon, 5 Aug 2019 00:47:41 +0000 (00:47 +0000)] 
backport: re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))

2019-08-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

Backport from trunk
PR fortran/87233
* expr.c (check_restricted): Relax constraint C1279 which was
removed from F2008 and above.

* gfortran.dg/initialization_14.f90: Modify to now pass by
removing two dg-error commands. Added comments.
* gfortran.dg/initialization_30.f90: New test that includes the
two tests removed above with the 'dg-options -std=f95'.

From-SVN: r274104

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

From-SVN: r274102

6 years agobackport: rs6000.c (rs6000_dbx_register_number): Return the correct numbers for TFHAR...
Segher Boessenkool [Sun, 4 Aug 2019 19:23:59 +0000 (21:23 +0200)] 
backport: rs6000.c (rs6000_dbx_register_number): Return the correct numbers for TFHAR, TFIAR, TEXASR.

Backport from trunk
2019-05-02  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
correct numbers for TFHAR, TFIAR, TEXASR.

From-SVN: r274097

6 years agoObjective-C, NeXT, backport workaround for PR90709
Iain Sandoe [Sun, 4 Aug 2019 13:34:19 +0000 (13:34 +0000)] 
Objective-C, NeXT, backport workaround for PR90709

Since we cannot parse the current NeXT headers, because of PR90709 and its
dependents, we have a large amount of testsuite noise for Darwin platforms.
In order to restore the usefulness of the testsuite, we are going add headers
without the modern syntax elements that trigger the bug, and use these for
test runs on newer Darwin.

The headers are imported from GNUStep, with some local modifications to make
sure that __BLOCKS__ is honoured as a gate for Apple-style blocks closures.

CF-CFString.h, F-NS*.h are proxy headers that use the installed CoreFoundation
or Foundation headers on systems <= Darwin12 and the GNUStep headers for newer.

Use the CF-CFString.h, F-NS*.h proxy headers where needed in the objective-c
testsuite. Make minor adjustments to tests as required, providing that those
do not alter the test intent.

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

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

PR objc/90709
* obj-c++.dg/proto-lossage-7.mm: Use proxy headers.
* obj-c++.dg/strings/const-cfstring-2.mm: Likewise.
* obj-c++.dg/strings/const-cfstring-5.mm: Likewise
* obj-c++.dg/strings/const-str-12.mm: Likewise.
* obj-c++.dg/syntax-error-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-cfstring-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-11.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
* obj-c++.dg/cxx-ivars-3.mm: Skip on later Darwin, where the 10.4 API
in no longer supported, also on m64 where there's no meaning to it.
* obj-c++.dg/isa-field-1.mm: Suppress unwanted warning, add comment why.
* obj-c++.dg/objc-gc-3.mm: Skip for Darwin > 16, the API use is an error
there.
* obj-c++.dg/qual-types-1.mm: Prune a spurious l64 warning.
* obj-c++.dg/stubify-1.mm: Tidy up after better compiler warnings.
* obj-c++.dg/stubify-2.mm: Likewise.
* obj-c++.dg/try-catch-1.mm: Likewise.
* obj-c++.dg/try-catch-3.mm: Likewise.

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

PR objc/90709
* objc.dg/encode-7-next-64bit.m: Use proxy headers.
* objc.dg/image-info.m: Likewise.
* objc.dg/method-6.m: Likewise.
* objc.dg/no-extra-load.m: Likewise.
* objc.dg/objc-foreach-4.m: Likewise.
* objc.dg/objc-foreach-5.m: Likewise.
* objc.dg/proto-lossage-7.m: Likewise.
* objc.dg/strings/const-cfstring-2.m: Likewise.
* objc.dg/strings/const-cfstring-5.m: Likewise.
* objc.dg/strings/const-str-12b.m: Likewise.
* objc.dg/symtab-1.m: Likewise.
* objc.dg/torture/strings/const-cfstring-1.m: Likewise.
* objc.dg/torture/strings/const-str-10.m: Likewise.
* objc.dg/torture/strings/const-str-11.m: Likewise.
* objc.dg/torture/strings/const-str-9.m: Likewise.
* objc.dg/zero-link-1.m: Likewise.
* objc.dg/zero-link-2.m: Likewise.
* objc.dg/zero-link-3.m: Likewise.
* objc.dg/isa-field-1.m: Suppress unwanted warning, add comment why.
* objc.dg/headers.m: XFAIL for Darwin14-19.
* objc.dg/objc-gc-4.m: Skip for Darwin > 16, the API use is an error
there.

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

PR objc/90709
* objc-obj-c++-shared/CF-CFString.h: New.
* objc-obj-c++-shared/F-NSArray.h: New.
* objc-obj-c++-shared/F-NSAutoreleasePool.h: New.
* objc-obj-c++-shared/F-NSObject.h: New.
* objc-obj-c++-shared/F-NSString.h: New.
* objc-obj-c++-shared/F-NSValue.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFArray.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFBase.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFCharacterSet.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFData.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFDictionary.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFLocale.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSArray.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSAutoreleasePool.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSDate.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSEnumerator.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSGeometry.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObject.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSRange.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSValue.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSZone.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GNUstep.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSBlocks.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSConfig.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSVersionMacros.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSArray+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSMutableString+GNUstepBase.h:
New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSNumber+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSObject+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSString+GNUstepBase.h: New.

From-SVN: r274095

6 years agoDarwin, PPC, testsuite, backport fix for bmi2-bzhi64-1a.c
Iain Sandoe [Sun, 4 Aug 2019 13:17:15 +0000 (13:17 +0000)] 
Darwin, PPC, testsuite, backport fix for bmi2-bzhi64-1a.c

This test is failing with older cpus because the included header needs both
altivec and vsx to be enabled to succeed in compiling. Without this (if these
are not defaults for the cpu) there are errors like:

In file included from ... x86intrin.h:41,
from ... bmi2-bzhi64-1a.c:6:
... xmmintrin.h: In function '_mm_loadu_ps':
... xmmintrin.h:122:11:
error: incompatible types when returning type 'int' but '__m128' {aka '__vector(4) float'} was expected
<snip>
... xmmintrin.h: In function '_mm_cvtps_pi32':
... xmmintrin.h:996:3:
error: use of 'long long' in AltiVec types is invalid without '-mvsx'
<snip>

Fixed by adding -maltivec -mvsx to the options

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

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

* gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec
and vsx.

From-SVN: r274093

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

The testcase is failing to instrument part of the source because of a bug
in the ordering of static DTORs. It seems unlikely that this is generically
fixable in the toolchain (and given that it's likely to be a dynamic loader
change would not be expected to be applied retrospectively to OS versions
that are out of support). To avoid the testsuite noise, xfail the count lines
that don't match (we can adjust the xfails as/when the upstream bug is fixed).

dejagnu xfails do not seem to work when embedded in a line like:
~Test (void) { .... /* count(1) { xfail ... } */ }
the closing brace seems to confuse the parser. The solution is to exapnd the
text onto three lines.

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

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

PR gcov-profile/91087
* g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the
"final" line for the failure summaries.  Adjust source layout so that
dejagnu xfail expressions work.

From-SVN: r274092

6 years agoDarwin, PPC, testsuite - backport fix for stabs-attrib-vect-darwin.
Iain Sandoe [Sun, 4 Aug 2019 13:10:00 +0000 (13:10 +0000)] 
Darwin, PPC, testsuite - backport fix for stabs-attrib-vect-darwin.

This test requires stabs support in the assembler so require it.

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

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

* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
support.

From-SVN: r274091

6 years agoDarwin, testsuite, backport removal of unused test.
Iain Sandoe [Sun, 4 Aug 2019 13:06:11 +0000 (13:06 +0000)] 
Darwin, testsuite, backport removal of unused test.

During GCC-9, the codegen for unreachable switch case statements changed
such that the (undefined) behaviour of reaching such statements is directed
to one of the existing switch cases. This means that the testcase which
deals with the old behaviour can no longer work (and there is nothing to test
with it). The [Darwin-specific] test is now redundant and can be removed.

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

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

* gcc.dg/pr57438-2.c: Remove.

From-SVN: r274090

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