]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
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

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

From-SVN: r273711

6 years ago[rs6000] Add _mm_blend_epi16 and _mm_blendv_epi8
Paul A. Clarke [Mon, 22 Jul 2019 16:32:37 +0000 (16:32 +0000)] 
[rs6000] Add _mm_blend_epi16 and _mm_blendv_epi8

Add compatibility implementations of _mm_blend_epi16 and _mm_blendv_epi8
intrinsics.

Respective test cases are copied almost verbatim (minor changes to
the dejagnu head lines) from i386.

2019-07-22  Paul A. Clarke  <pc@us.ibm.com>

[gcc]

* config/rs6000/smmintrin.h (_mm_blend_epi16): New.
(_mm_blendv_epi8): New.

[gcc/testsuite]

* gcc.target/powerpc/sse4_1-check.h: New.
* gcc.target/powerpc/sse4_1-pblendvb.c: New.
* gcc.target/powerpc/sse4_1-pblendw.c: New.
* gcc.target/powerpc/sse4_1-pblendw-2.c: New.

From-SVN: r273704

6 years agoBackport r273660
Martin Liska [Mon, 22 Jul 2019 09:37:18 +0000 (11:37 +0200)] 
Backport r273660

2019-07-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-22  Martin Liska  <mliska@suse.cz>

PR driver/91172
* opts-common.c (decode_cmdline_option): Decode
argument of -Werror and check it for a wrong language.
* opts-global.c (complain_wrong_lang): Remove such case.
2019-07-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-22  Martin Liska  <mliska@suse.cz>

PR driver/91172
* gcc.dg/pr91172.c: New test.

From-SVN: r273664

6 years ago[ARC] Backport ix emitting TLS symbols.
Claudiu Zissulescu [Mon, 22 Jul 2019 07:21:24 +0000 (09:21 +0200)] 
[ARC] Backport ix emitting TLS symbols.

From-SVN: r273658

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

From-SVN: r273655

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

From-SVN: r273639

6 years agoFix -Wreturn-type for static naked functions in C
Richard Sandiford [Sat, 20 Jul 2019 18:50:20 +0000 (18:50 +0000)] 
Fix -Wreturn-type for static naked functions in C

This patch extends the fix for PR53633 to include static functions,
which were giving a bogus -Wreturn-type warning for C but not for C++.

2019-07-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/c/
Backport from mainline
2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

PR c/53633
* c-decl.c (finish_function): Check targetm.warn_func_return
before issuing a -Wreturn-type warning.

gcc/testsuite/
Backport from mainline
2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

* c-c++-common/pr53633-2.c: New test.

From-SVN: r273635

6 years agoFix folding of vector EQ/NE
Richard Sandiford [Sat, 20 Jul 2019 18:49:59 +0000 (18:49 +0000)] 
Fix folding of vector EQ/NE

For vector1 != vector2, we returned false if any elements were equal,
rather than if all elements were equal.

2019-07-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
Backport from mainline
2019-07-10  Richard Sandiford  <richard.sandiford@arm.com>

* fold-const.c (fold_relational_const): Fix folding of
vector-to-scalar NE_EXPRs.
(test_vector_folding): Add more tests.

From-SVN: r273634

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

From-SVN: r273614

6 years agoPR c++/90098 - partial specialization and class non-type parms.
Jason Merrill [Fri, 19 Jul 2019 08:53:07 +0000 (04:53 -0400)] 
PR c++/90098 - partial specialization and class non-type parms.

A non-type template parameter of class type used in an expression has
const-qualified type; the pt.c hunks deal with this difference from the
unqualified type of the parameter declaration.  WAhen we use such a
parameter as an argument to another template, we don't want to confuse
things by copying it, we should pass it straight through.  And we might as
well skip copying other classes in constant evaluation context in a
template, too; we'll get the copy semantics at instantiation time.

PR c++/90099
PR c++/90101
* call.c (build_converted_constant_expr_internal): Don't copy.
* pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
around class non-type parameter.
(unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.
(invalid_nontype_parm_type_p): Check for dependent class type.

From-SVN: r273597

6 years agoPR c++/85552 - wrong instantiation of dtor for DMI.
Jason Merrill [Fri, 19 Jul 2019 08:52:58 +0000 (04:52 -0400)] 
PR c++/85552 - wrong instantiation of dtor for DMI.

* typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.

From-SVN: r273596

6 years agoPR c++/63149 - wrong auto deduction from braced-init-list
Nina Dinka Ranns [Fri, 19 Jul 2019 08:52:50 +0000 (08:52 +0000)] 
PR c++/63149 - wrong auto deduction from braced-init-list

2019-06-04  Nina Dinka Ranns  <dinka.ranns@gmail.com>

    gcc/cp/
    * pt.c (listify_autos): Use non cv qualified auto_node in
    std::initializer_list<auto>.

    testsuite/
    * g++.dg/cpp0x/initlist-deduce2.C: New test.

From-SVN: r273595

6 years agoPR c++/82081 - tail call optimization breaks noexcept
Jason Merrill [Fri, 19 Jul 2019 08:52:41 +0000 (04:52 -0400)] 
PR c++/82081 - tail call optimization breaks noexcept

If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification.  So we need to
prevent the optimization in that case.

* tree-tailcall.c (find_tail_calls): Don't turn a call from a
nothrow function to a might-throw function into a tail call.

From-SVN: r273594

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

From-SVN: r273589

6 years agoRISC-V: Fix splitter for 32-bit AND on 64-bit target.
Kito Cheng [Thu, 18 Jul 2019 07:00:32 +0000 (07:00 +0000)] 
RISC-V: Fix splitter for 32-bit AND on 64-bit target.

Fixes github.com/riscv/riscv-gcc issue #161.  We were accidentally using
BITS_PER_WORD to compute shift counts when we should have been using the
bitsize of the operand modes.  This was wrong when we had an SImode shift
and a 64-bit target.

Andrew Waterman  <andrew@sifive.com>
gcc/
* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/
* gcc.target/riscv/shift-shift-2.c: Add one more test.

gcc/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Andrew Waterman  <andrew@sifive.com>
    Jim Wilson  <jimw@sifive.com>

* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/

gcc/testsuite/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Jim Wilson  <jimw@sifive.com>

* gcc.target/riscv/shift-shift-2.c: Add one more test.

From-SVN: r273566

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

From-SVN: r273561

6 years agopa.c (pa_som_asm_init_sections): Don't force all constant data into data section...
John David Anglin [Thu, 18 Jul 2019 00:10:27 +0000 (00:10 +0000)] 
pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code.

* config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant
data into data section when generating PIC code.
(pa_select_section): Use pa_reloc_rw_mask() to qualify relocs.
(pa_reloc_rw_mask): Return 3 when generating PIC code and when
generating code for SOM targets earlier than HP-UX 11.  Otherwise,
return 2 for SOM and 0 for other targets.

From-SVN: r273558

6 years agoS/390: Fix vector shift count operand
Andreas Krebbel [Wed, 17 Jul 2019 07:32:30 +0000 (07:32 +0000)] 
S/390: Fix vector shift count operand

We currently use subst definitions to handle the different variants of shift
count operands. Unfortunately, in the vector shift pattern the shift count
operand is used directly. Without it being adjusted for the 'subst' variants the
displacement value is omitted resulting in a wrong shift count being applied.

This patch needs to be applied to older branches as well.

gcc/ChangeLog:

2019-07-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/vector.md: Fix shift count operand printing.

gcc/testsuite/ChangeLog:

2019-07-17  Andreas Krebbel  <krebbel@linux.ibm.com>

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/vector/vec-shift-2.c: New test.

From-SVN: r273546

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

From-SVN: r273540

6 years agoFix alignment option parser (PR90684)
Wilco Dijkstra [Tue, 16 Jul 2019 16:17:39 +0000 (16:17 +0000)] 
Fix alignment option parser (PR90684)

Fix the alignment option parser to always allow up to 4 alignments.
Now -falign-functions=16:8:8:8 no longer reports an error.

    gcc/
PR driver/90684
* gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values.

From-SVN: r273533

6 years agoAdd missing testcase for PR89190
Wilco Dijkstra [Tue, 16 Jul 2019 12:12:01 +0000 (12:12 +0000)] 
Add missing testcase for PR89190

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r273525

6 years agoDo not use -Werror in a test that has -frepo warning (PR testsuite/91175).
Martin Liska [Tue, 16 Jul 2019 10:21:57 +0000 (12:21 +0200)] 
Do not use -Werror in a test that has -frepo warning (PR testsuite/91175).

2019-07-16  Martin Liska  <mliska@suse.cz>

PR testsuite/91175
* g++.old-deja/g++.pt/instantiate4.C: Do not use -Werror.

From-SVN: r273521

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

From-SVN: r273504

6 years agoDeprecate -frepo on gcc-9 branch (PR c++/91125).
Martin Liska [Mon, 15 Jul 2019 04:11:43 +0000 (06:11 +0200)] 
Deprecate -frepo on gcc-9 branch (PR c++/91125).

2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* c-opts.c (c_common_handle_option): Warn the -frepo
will be removed in the future.
2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* g++.dg/parse/repo1.C: Add scan for the new warning.
* g++.dg/rtti/repo1.C: Likewise.
* g++.dg/template/repo1.C: Likewise.
* g++.dg/template/repo10.C: Likewise.
* g++.dg/template/repo11.C: Likewise.
* g++.dg/template/repo2.C: Likewise.
* g++.dg/template/repo3.C: Likewise.
* g++.dg/template/repo4.C: Likewise.
* g++.dg/template/repo5.C: Likewise.
* g++.dg/template/repo6.C: Likewise.
* g++.dg/template/repo7.C: Likewise.
* g++.dg/template/repo8.C: Likewise.
* g++.dg/template/repo9.C: Likewise.
* g++.old-deja/g++.pt/instantiate4.C: Likewise.
* g++.old-deja/g++.pt/instantiate6.C: Likewise.
* g++.old-deja/g++.pt/repo1.C: Likewise.
* g++.old-deja/g++.pt/repo2.C: Likewise.
* g++.old-deja/g++.pt/repo3.C: Likewise.
* g++.old-deja/g++.pt/repo4.C: Likewise.

From-SVN: r273489

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

From-SVN: r273487

6 years agobackport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction...
Jakub Jelinek [Sun, 14 Jul 2019 08:29:38 +0000 (10:29 +0200)] 
backport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction-modifier on target parallel combined construct)

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

PR c/91149
* c-omp.c (c_omp_split_clauses): Fix a pasto in
OMP_CLAUSE_REDUCTION_TASK handling.

* c-c++-common/gomp/reduction-task-3.c: New test.

From-SVN: r273478