diff -u gcc-8-8.3.0/debian/changelog gcc-8-8.3.0/debian/changelog --- gcc-8-8.3.0/debian/changelog +++ gcc-8-8.3.0/debian/changelog @@ -1,3 +1,79 @@ +gcc-8 (8.3.0-26ubuntu1~19.10) eoan-proposed; urgency=medium + + * SRU: LP: #1848319. + * Backport GCC 8.3 8.3.0-26ubuntu1 to eoan. + + -- Matthias Klose Wed, 04 Dec 2019 15:45:52 +0100 + +gcc-8 (8.3.0-26ubuntu1) focal; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Sun, 01 Dec 2019 20:35:45 +0100 + +gcc-8 (8.3.0-26) unstable; urgency=medium + + * Update to SVN 20191201 (r278885) from the gcc-8-branch. + - Fix PR fortran/92100, PR fortran/92629, PR driver/89014. + * Fix applying the gcc-linaro patch. + * Stop building -dbg packages, keep building the libstc++6-8-dbg package + containing just the libstdc++ debug build. + + -- Matthias Klose Sun, 01 Dec 2019 20:22:52 +0100 + +gcc-8 (8.3.0-25ubuntu4) focal; urgency=medium + + * Update to SVN 20191127 (r278756) from the gcc-8-branch. + - Fix PR fortran/92100. + * Stop building -dbg packages, keep building the libstc++6-8-dbg package + containing just the libstdc++ debug build. + + -- Matthias Klose Wed, 27 Nov 2019 08:35:51 +0100 + +gcc-8 (8.3.0-25ubuntu2) focal; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + * Fix applying the Linaro branch. + + -- Matthias Klose Tue, 26 Nov 2019 08:51:41 +0100 + +gcc-8 (8.3.0-25) unstable; urgency=medium + + * Update to SVN 20191126 (r278718) from the gcc-8-branch. + - Fix PR c/91401, PR tree-optimization/91355, PR middle-end/90840, + PR target/90867 (x86), PR c/90898, PR middle-end/91450, + PR c++/92384, PR tree-optimization/92056, PR tree-optimization/91665, + PR middle-end/91001, PR middle-end/91105, PR middle-end/91106, + PR middle-end/91623, PR other/92090, PR target/92389 (x86), + PR target/87833 (x86), PR target/92095 (SPARC), PR fortran/92113, + PR tree-optimization/85887, PR c++/92201, PR c++/91974, + PR preprocessor/92296, PR fortran/92569, PR ada/92575. + + -- Matthias Klose Tue, 26 Nov 2019 08:34:48 +0100 + +gcc-8 (8.3.0-24ubuntu1) focal; urgency=medium + + * Merge with Debian; remaining changes: + - Build from upstream sources. + + -- Matthias Klose Thu, 07 Nov 2019 18:27:01 +0100 + +gcc-8 (8.3.0-24) unstable; urgency=medium + + * Update to SVN 20191107 (r277923) from the gcc-8-branch. + - Fix PR target/91275 (PPC), PR fortran/84487, PR libstdc++/92143, + PR libstdc++/92059, PR target/86487, PR target/65342 (PPC), + PR target/70010 (PPC), PR target/88167 (ARM), PR debug/91887, + PR tree-optimization/91812, PR debug/91772, PR tree-optimization/92131, + PR target/86040 (AVR), PR rtl-optimization/89721, PR target/89400 (ARM), + PR target/92022 (ALPHA), PR target/88630 (SH), PR c++/88075, + PR c++/92106, PR ada/91995, PR fortran/86248, PR fortran/69455, + PR rtl-optimization/85458, PR target/91289 (PPC). + + -- Matthias Klose Thu, 07 Nov 2019 18:09:26 +0100 + gcc-8 (8.3.0-23ubuntu2) eoan; urgency=medium * Update to SVN 20191008 (r276700) from the gcc-8-branch. @@ -294,6 +370,20 @@ -- Matthias Klose Sun, 28 Apr 2019 09:43:41 +0200 +gcc-8 (8.3.0-6ubuntu1~18.04.1) bionic; urgency=medium + + * No-change rebuild strictly against -security only (LP: #1828171). + + -- Ɓukasz 'sil2100' Zemczak Wed, 08 May 2019 17:51:17 +0200 + +gcc-8 (8.3.0-6ubuntu1~18.04) bionic-proposed; urgency=medium + + * SRU: LP: #1814369. + * Update to the GCC 8.3.0 release. + * Don't build from the ARM/Linaro branch on armhf/arm64. + + -- Matthias Klose Sun, 07 Apr 2019 03:20:36 +0200 + gcc-8 (8.3.0-6ubuntu1) disco; urgency=medium * Merge with Debian; remaining changes: @@ -872,6 +962,12 @@ -- Matthias Klose Thu, 02 Aug 2018 05:59:26 +0200 +gcc-8 (8.2.0-1ubuntu2~18.04) bionic-proposed; urgency=medium + + * SRU: LP: #1769657. Update the package to the current version in cosmic. + + -- Matthias Klose Sat, 28 Jul 2018 08:13:41 +0200 + gcc-8 (8.2.0-1ubuntu2) cosmic; urgency=medium * Update to SVN 20180727 (r263045) from the gcc-8-branch. diff -u gcc-8-8.3.0/debian/control gcc-8-8.3.0/debian/control --- gcc-8-8.3.0/debian/control +++ gcc-8-8.3.0/debian/control @@ -203,7 +203,7 @@ libtsan0-dbg (>= ${gcc:Version}), libubsan1-dbg (>= ${gcc:Version}), libmpx2-dbg (>= ${gcc:Version}), - libquadmath0-dbg (>= ${gcc:Version}) + libquadmath0-dbg (>= ${gcc:Version}), Provides: c-compiler Description: GNU C compiler This is the GNU C compiler, a fairly portable optimizing compiler for C. @@ -291,7 +291,7 @@ Priority: optional Depends: gcc-8-base (= ${gcc:Version}), gcc-8 (= ${gcc:Version}), libstdc++-8-dev (= ${gcc:Version}), ${shlibs:Depends}, ${misc:Depends} Provides: c++-compiler, c++abi2-dev -Suggests: ${gxx:multilib}, gcc-8-doc (>= ${gcc:SoftVersion}), libstdc++6-8-dbg (>= ${gcc:Version}) +Suggests: ${gxx:multilib}, gcc-8-doc (>= ${gcc:SoftVersion}), libstdc++6-8-dbg (>= ${gcc:Version}), Description: GNU C++ compiler This is the GNU C++ compiler, a fairly portable optimizing compiler for C++. @@ -524,7 +524,7 @@ Architecture: any Priority: optional Depends: gcc-8-base (= ${gcc:Version}), gcc-8 (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libobjc-8-dev (= ${gcc:Version}), ${misc:Depends} -Suggests: ${gobjc:multilib}, gcc-8-doc (>= ${gcc:SoftVersion}), libobjc4-dbg (>= ${gcc:Version}) +Suggests: ${gobjc:multilib}, gcc-8-doc (>= ${gcc:SoftVersion}), libobjc4-dbg (>= ${gcc:Version}), Provides: objc-compiler Description: GNU Objective-C compiler This is the GNU Objective-C compiler, which compiles @@ -723,7 +723,7 @@ Priority: optional Depends: gcc-8-base (= ${gcc:Version}), gcc-8 (= ${gcc:Version}), libgo13 (>= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends} Provides: go-compiler -Suggests: ${go:multilib}, gccgo-8-doc, libgo13-dbg (>= ${gcc:Version}) +Suggests: ${go:multilib}, gccgo-8-doc, libgo13-dbg (>= ${gcc:Version}), Conflicts: ${golang:Conflicts} Breaks: libgo12 (<< 8-20171209-2) Replaces: libgo12 (<< 8-20171209-2) @@ -1385,7 +1385,7 @@ hsail-tools, ${shlibs:Depends}, libhsail-rt-8-dev (= ${gcc:Version}), ${misc:Depends} Suggests: ${gccbrig:multilib}, - libhsail-rt0-dbg (>= ${gcc:Version}) + libhsail-rt0-dbg (>= ${gcc:Version}), Provides: brig-compiler Description: GNU BRIG (HSA IL) frontend This is the GNU BRIG (HSA IL) frontend. diff -u gcc-8-8.3.0/debian/control.m4 gcc-8-8.3.0/debian/control.m4 --- gcc-8-8.3.0/debian/control.m4 +++ gcc-8-8.3.0/debian/control.m4 @@ -29,7 +29,11 @@ ifdef(`TARGET',`ifelse(CROSS_ARCH,`all',` define(`libidevdep', `lib$2$1`'LS`'AQ (>= ifelse(`$4',`',`${gcc:SoftVersion}',`$4'))') ')') +ifelse(index(enabled_languages, `libdbg'), -1, ` +define(`libdbgdep', `') +',` define(`libdbgdep', `lib$2$1`'LS`'AQ (ifelse(`$3',`',`>=',`$3') ifelse(`$4',`',`${gcc:Version}',`$4'))') +')`'dnl libdbg define(`BUILT_USING', ifelse(add_built_using,yes,`Built-Using: ${Built-Using} ')) @@ -216,6 +220,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libgcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -234,6 +239,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg Package: libgcc2`'LS TARGET_PACKAGE`'dnl @@ -258,6 +264,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libgcc2-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`m68k') @@ -274,6 +281,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl libgcc ifenabled(`cdev',` @@ -318,6 +326,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libgcc4-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`hppa') @@ -334,6 +343,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ifenabled(`lib64gcc',` Package: lib64gcc1`'LS @@ -356,6 +366,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: lib64gcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -370,6 +381,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl lib64gcc ifenabled(`cdev',` @@ -413,6 +425,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: lib32gcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -427,6 +440,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl lib32gcc1 ifenabled(`cdev',` @@ -487,6 +501,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libhfgcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -502,6 +517,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl libhfgcc ifenabled(`cdev',` @@ -547,6 +563,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libsfgcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -562,6 +579,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl libsfgcc ifenabled(`cdev',` @@ -607,6 +625,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libn32gcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -621,6 +640,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl libn32gcc ifenabled(`cdev',` @@ -663,6 +683,7 @@ environment. ')`'dnl +ifenabled(`libdbg',` Package: libx32gcc1-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -677,6 +698,7 @@ This package contains files for TARGET architecture, for use in cross-compile environment. ')`'dnl +')`'dnl libdbg ')`'dnl libx32gcc ifenabled(`cdev',` @@ -729,7 +751,7 @@ libdbgdep(vtv`'VTV_SO-dbg,), ')`'dnl libdbgdep(mpx`'MPX_SO-dbg,), - libdbgdep(quadmath`'QMATH_SO-dbg,) + libdbgdep(quadmath`'QMATH_SO-dbg,), Provides: c-compiler`'TS ifdef(`TARGET',`Conflicts: gcc-multilib ')`'dnl @@ -862,7 +884,7 @@ Priority: optional Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), libidevdep(stdc++`'PV-dev,,=), ${shlibs:Depends}, ${misc:Depends} Provides: c++-compiler`'TS`'ifdef(`TARGET',`',`, c++abi2-dev') -Suggests: ${gxx:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(stdc++CXX_SO`'PV-dbg,) +Suggests: ${gxx:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(stdc++CXX_SO`'PV-dbg), BUILT_USING`'dnl Description: GNU C++ compiler`'ifdef(`TARGET',` (cross compiler for TARGET architecture)', `') This is the GNU C++ compiler, a fairly portable optimizing compiler for C++. @@ -1004,6 +1026,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: libgomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1018,6 +1041,7 @@ Description: GCC OpenMP (GOMP) support library (debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +')`'dnl libdbg Package: lib32gomp`'GOMP_SO`'LS TARGET_PACKAGE`'dnl @@ -1031,6 +1055,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: lib32gomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1041,6 +1066,7 @@ Description: GCC OpenMP (GOMP) support library (32 bit debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +')`'dnl libdbg Package: lib64gomp`'GOMP_SO`'LS TARGET_PACKAGE`'dnl @@ -1053,6 +1079,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: lib64gomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -1063,6 +1090,7 @@ Description: GCC OpenMP (GOMP) support library (64bit debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +')`'dnl libdbg Package: libn32gomp`'GOMP_SO`'LS TARGET_PACKAGE`'dnl @@ -1075,6 +1103,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: libn32gomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -1084,6 +1113,7 @@ BUILT_USING`'dnl Description: GCC OpenMP (GOMP) support library (n32 debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers +')`'dnl libdbg ifenabled(`libx32gomp',` Package: libx32gomp`'GOMP_SO`'LS @@ -1097,6 +1127,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: libx32gomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -1106,6 +1137,7 @@ BUILT_USING`'dnl Description: GCC OpenMP (GOMP) support library (x32 debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers +')`'dnl libdbg ')`'dnl libx32gomp ifenabled(`libhfgomp',` @@ -1121,6 +1153,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: libhfgomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -1131,6 +1164,7 @@ BUILT_USING`'dnl Description: GCC OpenMP (GOMP) support library (hard float ABI debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers +')`'dnl libdbg ')`'dnl libhfgomp ifenabled(`libsfgomp',` @@ -1146,6 +1180,7 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers in the GNU Compiler Collection. +ifenabled(`libdbg',` Package: libsfgomp`'GOMP_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -1156,6 +1191,7 @@ BUILT_USING`'dnl Description: GCC OpenMP (GOMP) support library (soft float ABI debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran compilers +')`'dnl libdbg ')`'dnl libsfgomp ifenabled(`libneongomp',` @@ -1193,6 +1229,7 @@ accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: libitm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1208,6 +1245,7 @@ GNU Transactional Memory Library (libitm) provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg Package: lib32itm`'ITM_SO`'LS TARGET_PACKAGE`'dnl @@ -1222,6 +1260,7 @@ accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: lib32itm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1233,6 +1272,7 @@ GNU Transactional Memory Library (libitm) provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg Package: lib64itm`'ITM_SO`'LS TARGET_PACKAGE`'dnl @@ -1246,6 +1286,7 @@ accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: lib64itm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -1257,6 +1298,7 @@ GNU Transactional Memory Library (libitm) provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg #Package: libn32itm`'ITM_SO`'LS #Section: ifdef(`TARGET',`devel',`libs') @@ -1293,6 +1335,7 @@ transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: libx32itm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -1304,6 +1347,7 @@ This manual documents the usage and internals of libitm. It provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg ')`'dnl libx32itm ifenabled(`libhfitm',` @@ -1320,6 +1364,7 @@ accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: libhfitm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -1332,6 +1377,7 @@ GNU Transactional Memory Library (libitm) provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg ')`'dnl libhfitm ifenabled(`libsfitm',` @@ -1347,6 +1393,7 @@ accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +ifenabled(`libdbg',` Package: libsfitm`'ITM_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -1358,6 +1405,7 @@ GNU Transactional Memory Library (libitm) provides transaction support for accesses to the memory of a process, enabling easy-to-use synchronization of accesses to shared memory by several threads. +')`'dnl libdbg ')`'dnl libsfitm ifenabled(`libneonitm',` @@ -1395,6 +1443,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: libatomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1409,6 +1458,7 @@ Description: support library providing __atomic built-in functions (debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg Package: lib32atomic`'ATOMIC_SO`'LS TARGET_PACKAGE`'dnl @@ -1422,6 +1472,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: lib32atomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1432,6 +1483,7 @@ Description: support library providing __atomic built-in functions (32 bit debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg Package: lib64atomic`'ATOMIC_SO`'LS TARGET_PACKAGE`'dnl @@ -1444,6 +1496,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: lib64atomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -1454,6 +1507,7 @@ Description: support library providing __atomic built-in functions (64bit debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg Package: libn32atomic`'ATOMIC_SO`'LS TARGET_PACKAGE`'dnl @@ -1466,6 +1520,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: libn32atomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -1476,6 +1531,7 @@ Description: support library providing __atomic built-in functions (n32 debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg ifenabled(`libx32atomic',` Package: libx32atomic`'ATOMIC_SO`'LS @@ -1489,6 +1545,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: libx32atomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -1499,6 +1556,7 @@ Description: support library providing __atomic built-in functions (x32 debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg ')`'dnl libx32atomic ifenabled(`libhfatomic',` @@ -1514,6 +1572,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: libhfatomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -1525,6 +1584,7 @@ Description: support library providing __atomic built-in functions (hard float ABI debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg ')`'dnl libhfatomic ifenabled(`libsfatomic',` @@ -1539,6 +1599,7 @@ library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +ifenabled(`libdbg',` Package: libsfatomic`'ATOMIC_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -1549,6 +1610,7 @@ Description: support library providing __atomic built-in functions (soft float ABI debug symbols) library providing __atomic built-in functions. When an atomic call cannot be turned into lock-free instructions, GCC will make calls into this library. +')`'dnl libdbg ')`'dnl libsfatomic ifenabled(`libneonatomic',` @@ -1585,6 +1647,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: libasan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1599,6 +1662,7 @@ Description: AddressSanitizer -- a fast memory error detector (debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg Package: lib32asan`'ASAN_SO`'LS TARGET_PACKAGE`'dnl @@ -1612,6 +1676,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: lib32asan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1622,6 +1687,7 @@ Description: AddressSanitizer -- a fast memory error detector (32 bit debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg Package: lib64asan`'ASAN_SO`'LS TARGET_PACKAGE`'dnl @@ -1634,6 +1700,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: lib64asan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -1644,6 +1711,7 @@ Description: AddressSanitizer -- a fast memory error detector (64bit debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg #Package: libn32asan`'ASAN_SO`'LS #Section: ifdef(`TARGET',`devel',`libs') @@ -1677,6 +1745,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: libx32asan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -1687,6 +1756,7 @@ Description: AddressSanitizer -- a fast memory error detector (x32 debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg ')`'dnl libx32asan ifenabled(`libhfasan',` @@ -1702,6 +1772,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: libhfasan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -1713,6 +1784,7 @@ Description: AddressSanitizer -- a fast memory error detector (hard float ABI debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg ')`'dnl libhfasan ifenabled(`libsfasan',` @@ -1727,6 +1799,7 @@ AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +ifenabled(`libdbg',` Package: libsfasan`'ASAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -1737,6 +1810,7 @@ Description: AddressSanitizer -- a fast memory error detector (soft float ABI debug symbols) AddressSanitizer (ASan) is a fast memory error detector. It finds use-after-free and {heap,stack,global}-buffer overflow bugs in C/C++ programs. +')`'dnl libdbg ')`'dnl libsfasan ifenabled(`libneonasan',` @@ -1771,6 +1845,7 @@ LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +ifenabled(`libdbg',` Package: liblsan`'LSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1783,6 +1858,7 @@ Description: LeakSanitizer -- a memory leak detector (debug symbols) LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +')`'dnl libdbg ifenabled(`lib32lsan',` Package: lib32lsan`'LSAN_SO`'LS @@ -1797,6 +1873,7 @@ LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer (empty package). +ifenabled(`libdbg',` Package: lib32lsan`'LSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1807,6 +1884,7 @@ Description: LeakSanitizer -- a memory leak detector (32 bit debug symbols) LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer (empty package). +')`'dnl libdbg ')`'dnl lib32lsan ifenabled(`lib64lsan',` @@ -1820,6 +1898,7 @@ # LeakSanitizer (Lsan) is a memory leak detector which is integrated # into AddressSanitizer. +ifenabled(`libdbg',` #Package: lib64lsan`'LSAN_SO-dbg`'LS #Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') #Section: debug @@ -1829,6 +1908,7 @@ #Description: LeakSanitizer -- a memory leak detector (64bit debug symbols) # LeakSanitizer (Lsan) is a memory leak detector which is integrated # into AddressSanitizer. +')`'dnl libdbg ')`'dnl lib64lsan ifenabled(`libn32lsan',` @@ -1842,6 +1922,7 @@ # LeakSanitizer (Lsan) is a memory leak detector which is integrated # into AddressSanitizer. +ifenabled(`libdbg',` #Package: libn32lsan`'LSAN_SO-dbg`'LS #Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') #Section: debug @@ -1851,6 +1932,7 @@ #Description: LeakSanitizer -- a memory leak detector (n32 debug symbols) # LeakSanitizer (Lsan) is a memory leak detector which is integrated # into AddressSanitizer. +')`'dnl libdbg ')`'dnl libn32lsan ifenabled(`libx32lsan',` @@ -1865,6 +1947,7 @@ LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer (empty package). +ifenabled(`libdbg',` Package: libx32lsan`'LSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -1875,6 +1958,7 @@ Description: LeakSanitizer -- a memory leak detector (x32 debug symbols) LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer (empty package). +')`'dnl libdbg ')`'dnl libx32lsan ifenabled(`libhflsan',` @@ -1890,6 +1974,7 @@ LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +ifenabled(`libdbg',` Package: libhflsan`'LSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -1901,6 +1986,7 @@ Description: LeakSanitizer -- a memory leak detector (hard float ABI debug symbols) LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +')`'dnl libdbg ')`'dnl libhflsan ifenabled(`libsflsan',` @@ -1915,6 +2001,7 @@ LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +ifenabled(`libdbg',` Package: libsflsan`'LSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -1925,6 +2012,7 @@ Description: LeakSanitizer -- a memory leak detector (soft float ABI debug symbols) LeakSanitizer (Lsan) is a memory leak detector which is integrated into AddressSanitizer. +')`'dnl libdbg ')`'dnl libsflsan ifenabled(`libneonlsan',` @@ -1961,6 +2049,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: libtsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -1975,6 +2064,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ifenabled(`lib32tsan',` Package: lib32tsan`'TSAN_SO`'LS @@ -1989,6 +2079,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: lib32tsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -1999,6 +2090,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (32 bit debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ')`'dnl lib32tsan ifenabled(`lib64tsan',` @@ -2013,6 +2105,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: lib64tsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -2023,6 +2116,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (64bit debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ')`'dnl lib64tsan ifenabled(`libn32tsan',` @@ -2037,6 +2131,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: libn32tsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -2047,6 +2142,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (n32 debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ')`'dnl libn32tsan ifenabled(`libx32tsan',` @@ -2061,6 +2157,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: libx32tsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -2071,6 +2168,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (x32 debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ')`'dnl libx32tsan ifenabled(`libhftsan',` @@ -2086,6 +2184,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: libhftsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -2095,6 +2194,7 @@ ifdef(`TARGET',`dnl',`Conflicts: libtsan'TSAN_SO`-armel [biarchsf_archs]') BUILT_USING`'dnl Description: ThreadSanitizer -- a Valgrind-based detector of data races (hard float ABI debug symbols) +')`'dnl libdbg ')`'dnl libhftsan ifenabled(`libsftsan',` @@ -2109,6 +2209,7 @@ ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +ifenabled(`libdbg',` Package: libsftsan`'TSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -2119,6 +2220,7 @@ Description: ThreadSanitizer -- a Valgrind-based detector of data races (soft float ABI debug symbols) ThreadSanitizer (Tsan) is a data race detector for C/C++ programs. The Linux and Mac versions are based on Valgrind. +')`'dnl libdbg ')`'dnl libsftsan ifenabled(`libneontsan',` @@ -2156,6 +2258,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: libubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -2171,6 +2274,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ifenabled(`lib32ubsan',` Package: lib32ubsan`'UBSAN_SO`'LS @@ -2186,6 +2290,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: lib32ubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -2197,6 +2302,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl lib32ubsan ifenabled(`lib64ubsan',` @@ -2212,6 +2318,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: lib64ubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -2223,6 +2330,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl lib64ubsan ifenabled(`libn32ubsan',` @@ -2237,6 +2345,7 @@ # Various computations will be instrumented to detect undefined behavior # at runtime. Available for C and C++. +ifenabled(`libdbg',` #Package: libn32ubsan`'UBSAN_SO-dbg`'LS #Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') #Section: debug @@ -2247,6 +2356,7 @@ # UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. # Various computations will be instrumented to detect undefined behavior # at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl libn32ubsan ifenabled(`libx32ubsan',` @@ -2262,6 +2372,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: libx32ubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -2273,6 +2384,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl libx32ubsan ifenabled(`libhfubsan',` @@ -2289,6 +2401,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: libhfubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -2301,6 +2414,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl libhfubsan ifenabled(`libsfubsan',` @@ -2316,6 +2430,7 @@ Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +ifenabled(`libdbg',` Package: libsfubsan`'UBSAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -2327,6 +2442,7 @@ UndefinedBehaviorSanitizer can be enabled via -fsanitize=undefined. Various computations will be instrumented to detect undefined behavior at runtime. Available for C and C++. +')`'dnl libdbg ')`'dnl libsfubsan ifenabled(`libneonubsan',` @@ -2364,6 +2480,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: libvtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -2378,6 +2495,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ifenabled(`lib32vtv',` Package: lib32vtv`'VTV_SO`'LS @@ -2394,6 +2512,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: lib32vtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -2406,6 +2525,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl lib32vtv ifenabled(`lib64vtv',` @@ -2422,6 +2542,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: lib64vtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -2434,6 +2555,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl lib64vtv ifenabled(`libn32vtv',` @@ -2450,6 +2572,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: libn32vtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -2462,6 +2585,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl libn32vtv ifenabled(`libx32vtv',` @@ -2478,6 +2602,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: libx32vtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -2490,6 +2615,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl libx32vtv ifenabled(`libhfvtv',` @@ -2507,6 +2633,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: libhfvtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -2520,6 +2647,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl libhfvtv ifenabled(`libsfvtv',` @@ -2536,6 +2664,7 @@ vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +ifenabled(`libdbg',` Package: libsfvtv`'VTV_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -2548,6 +2677,7 @@ is designed to detect and handle (during program execution) when a vtable pointer that is about to be used for a virtual function call is not a valid vtable pointer for that call. +')`'dnl libdbg ')`'dnl libsfvtv ifenabled(`libneonvtv',` @@ -2589,6 +2719,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: libmpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -2605,6 +2736,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ifenabled(`lib32mpx',` Package: lib32mpx`'MPX_SO`'LS @@ -2622,6 +2754,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: lib32mpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -2634,6 +2767,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl lib32mpx ifenabled(`lib64mpx',` @@ -2651,6 +2785,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: lib64mpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -2663,6 +2798,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl lib64mpx ifenabled(`libn32mpx',` @@ -2679,6 +2815,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: libn32mpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -2691,6 +2828,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl libn32mpx ifenabled(`libx32mpx',` @@ -2707,6 +2845,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: libx32mpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -2719,6 +2858,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl libx32mpx ifenabled(`libhfmpx',` @@ -2736,6 +2876,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: libhfmpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -2749,6 +2890,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl libhfmpx ifenabled(`libsfmpx',` @@ -2765,6 +2907,7 @@ software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +ifenabled(`libdbg',` Package: libsfmpx`'MPX_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -2777,6 +2920,7 @@ runtime library and OS support, brings increased robustness to software by checking pointer references whose compile time normal intentions are usurped at runtime due to buffer overflow. +')`'dnl libdbg ')`'dnl libsfmpx ')`'dnl libmpx @@ -2797,6 +2941,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: libbacktrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -2811,6 +2956,7 @@ Description: stack backtrace library (debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg Package: lib32backtrace`'BTRACE_SO`'LS TARGET_PACKAGE`'dnl @@ -2824,6 +2970,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: lib32backtrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -2834,6 +2981,7 @@ Description: stack backtrace library (32 bit debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg Package: lib64backtrace`'BTRACE_SO`'LS TARGET_PACKAGE`'dnl @@ -2846,6 +2994,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: lib64backtrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -2856,6 +3005,7 @@ Description: stack backtrace library (64bit debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg Package: libn32backtrace`'BTRACE_SO`'LS TARGET_PACKAGE`'dnl @@ -2868,6 +3018,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: libn32backtrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') @@ -2878,6 +3029,7 @@ Description: stack backtrace library (n32 debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg ifenabled(`libx32backtrace',` Package: libx32backtrace`'BTRACE_SO`'LS @@ -2891,6 +3043,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: libx32backtrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -2901,6 +3054,7 @@ Description: stack backtrace library (x32 debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg ')`'dnl libx32backtrace ifenabled(`libhfbacktrace',` @@ -2916,6 +3070,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: libhfbacktrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -2927,6 +3082,7 @@ Description: stack backtrace library (hard float ABI debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg ')`'dnl libhfbacktrace ifenabled(`libsfbacktrace',` @@ -2941,6 +3097,7 @@ libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +ifenabled(`libdbg',` Package: libsfbacktrace`'BTRACE_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -2951,6 +3108,7 @@ Description: stack backtrace library (soft float ABI debug symbols) libbacktrace uses the GCC unwind interface to collect a stack trace, and parses DWARF debug info to get file/line/function information. +')`'dnl libdbg ')`'dnl libsfbacktrace ifenabled(`libneonbacktrace',` @@ -2987,6 +3145,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: libquadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -2999,6 +3158,7 @@ Description: GCC Quad-Precision Math Library (debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg Package: lib32quadmath`'QMATH_SO`'LS TARGET_PACKAGE`'dnl @@ -3013,6 +3173,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: lib32quadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch32_archs') @@ -3023,6 +3184,7 @@ Description: GCC Quad-Precision Math Library (32 bit debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg Package: lib64quadmath`'QMATH_SO`'LS TARGET_PACKAGE`'dnl @@ -3036,6 +3198,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: lib64quadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarch64_archs') @@ -3046,6 +3209,7 @@ Description: GCC Quad-Precision Math Library (64bit debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg #Package: libn32quadmath`'QMATH_SO`'LS #Section: ifdef(`TARGET',`devel',`libs') @@ -3058,6 +3222,7 @@ # supporting the __float128 datatype. The library is used to provide on such # targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` #Package: libn32quadmath`'QMATH_SO-dbg`'LS #Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchn32_archs') #Section: debug @@ -3067,6 +3232,7 @@ #Description: GCC Quad-Precision Math Library (n32 debug symbols) # A library, which provides quad-precision mathematical functions on targets # supporting the __float128 datatype. +')`'dnl libdbg ifenabled(`libx32qmath',` Package: libx32quadmath`'QMATH_SO`'LS @@ -3081,6 +3247,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: libx32quadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchx32_archs') @@ -3091,6 +3258,7 @@ Description: GCC Quad-Precision Math Library (x32 debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg ')`'dnl libx32qmath ifenabled(`libhfqmath',` @@ -3106,6 +3274,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: libhfquadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchhf_archs') @@ -3116,6 +3285,7 @@ Description: GCC Quad-Precision Math Library (hard float ABI debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg ')`'dnl libhfqmath ifenabled(`libsfqmath',` @@ -3131,6 +3301,7 @@ supporting the __float128 datatype. The library is used to provide on such targets the REAL(16) type in the GNU Fortran compiler. +ifenabled(`libdbg',` Package: libsfquadmath`'QMATH_SO-dbg`'LS TARGET_PACKAGE`'dnl Architecture: ifdef(`TARGET',`CROSS_ARCH',`biarchsf_archs') @@ -3141,6 +3312,7 @@ Description: GCC Quad-Precision Math Library (hard float ABI debug symbols) A library, which provides quad-precision mathematical functions on targets supporting the __float128 datatype. +')`'dnl libdbg ')`'dnl libsfqmath ')`'dnl libqmath @@ -3173,6 +3345,7 @@ libgccjit provides an embeddable shared library with an API for adding compilation to existing programs using GCC. +ifenabled(`libdbg',` Package: libgccjit`'GCCJIT_SO-dbg Section: debug Architecture: ifdef(`TARGET',`CROSS_ARCH',`any') @@ -3188,6 +3361,7 @@ Description: GCC just-in-time compilation (debug information) libgccjit provides an embeddable shared library with an API for adding compilation to existing programs using GCC. +')`'dnl libdbg ')`'dnl libjit ifenabled(`jit',` @@ -3260,7 +3434,7 @@ ')dnl Priority: optional Depends: BASEDEP, gcc`'PV`'TS (= ${gcc:Version}), ${dep:libcdev}, ${shlibs:Depends}, libidevdep(objc`'PV-dev,,=), ${misc:Depends} -Suggests: ${gobjc:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(objc`'OBJC_SO-dbg,) +Suggests: ${gobjc:multilib}, gcc`'PV-doc (>= ${gcc:SoftVersion}), libdbgdep(objc`'OBJC_SO-dbg), Provides: objc-compiler`'TS ifdef(`__sparc__',`Conflicts: gcc`'PV-sparc64', `dnl') BUILT_USING`'dnl @@ -3389,6 +3563,7 @@ Description: Runtime library for GNU Objective-C applications Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: libobjc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3402,6 +3577,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl libobjc ifenabled(`lib64objc',` @@ -3415,6 +3591,7 @@ Description: Runtime library for GNU Objective-C applications (64bit) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: lib64objc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3424,6 +3601,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (64 bit debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl lib64objc ifenabled(`lib32objc',` @@ -3438,6 +3616,7 @@ Description: Runtime library for GNU Objective-C applications (32bit) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: lib32objc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3447,6 +3626,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (32 bit debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl lib32objc ifenabled(`libn32objc',` @@ -3460,6 +3640,7 @@ Description: Runtime library for GNU Objective-C applications (n32) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: libn32objc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3469,6 +3650,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (n32 debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl libn32objc ifenabled(`libx32objc',` @@ -3482,6 +3664,7 @@ Description: Runtime library for GNU Objective-C applications (x32) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: libx32objc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3491,6 +3674,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (x32 debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl libx32objc ifenabled(`libhfobjc',` @@ -3505,6 +3689,7 @@ Description: Runtime library for GNU Objective-C applications (hard float ABI) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: libhfobjc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3515,6 +3700,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (hard float ABI debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl libhfobjc ifenabled(`libsfobjc',` @@ -3529,6 +3715,7 @@ Description: Runtime library for GNU Objective-C applications (soft float ABI) Library needed for GNU ObjC applications linked against the shared library. +ifenabled(`libdbg',` Package: libsfobjc`'OBJC_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3539,6 +3726,7 @@ BUILT_USING`'dnl Description: Runtime library for GNU Objective-C applications (soft float ABI debug symbols) Library needed for GNU ObjC applications linked against the shared library. +')`'dnl libdbg ')`'dnl libsfobjc ifenabled(`libneonobjc',` @@ -3568,7 +3756,7 @@ ifdef(`TARGET',`',`Provides: fortran95-compiler, ${fortran:mod-version} ')dnl Suggests: ${gfortran:multilib}, gfortran`'PV-doc, - libdbgdep(gfortran`'FORTRAN_SO-dbg,), + libdbgdep(gfortran`'FORTRAN_SO-dbg), libcoarrays-dev BUILT_USING`'dnl Description: GNU Fortran compiler @@ -3707,6 +3895,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: libgfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3721,6 +3910,7 @@ Description: Runtime library for GNU Fortran applications (debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl libgfortran ifenabled(`lib64gfortran',` @@ -3735,6 +3925,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: lib64gfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3745,6 +3936,7 @@ Description: Runtime library for GNU Fortran applications (64bit debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl lib64gfortran ifenabled(`lib32gfortran',` @@ -3760,6 +3952,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: lib32gfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3770,6 +3963,7 @@ Description: Runtime library for GNU Fortran applications (32 bit debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl lib32gfortran ifenabled(`libn32gfortran',` @@ -3784,6 +3978,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: libn32gfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3794,6 +3989,7 @@ Description: Runtime library for GNU Fortran applications (n32 debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl libn32gfortran ifenabled(`libx32gfortran',` @@ -3808,6 +4004,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: libx32gfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3818,6 +4015,7 @@ Description: Runtime library for GNU Fortran applications (x32 debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl libx32gfortran ifenabled(`libhfgfortran',` @@ -3833,6 +4031,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: libhfgfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3844,6 +4043,7 @@ Description: Runtime library for GNU Fortran applications (hard float ABI debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl libhfgfortran ifenabled(`libsfgfortran',` @@ -3859,6 +4059,7 @@ Library needed for GNU Fortran applications linked against the shared library. +ifenabled(`libdbg',` Package: libsfgfortran`'FORTRAN_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3870,6 +4071,7 @@ Description: Runtime library for GNU Fortran applications (hard float ABI debug symbols) Library needed for GNU Fortran applications linked against the shared library. +')`'dnl libdbg ')`'dnl libsfgfortran ifenabled(`libneongfortran',` @@ -3903,7 +4105,7 @@ Depends: BASEDEP, ifdef(`STANDALONEGO',`${dep:libcc1}, ',`gcc`'PV`'TS (= ${gcc:Version}), ')libidevdep(go`'GO_SO,,>=), ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends} ifdef(`TARGET',`',`Provides: go-compiler ')dnl -Suggests: ${go:multilib}, gccgo`'PV-doc, libdbgdep(go`'GO_SO-dbg,) +Suggests: ${go:multilib}, gccgo`'PV-doc, libdbgdep(go`'GO_SO-dbg), Conflicts: ${golang:Conflicts} Breaks: libgo12`'LS (<< 8-20171209-2) Replaces: libgo12`'LS (<< 8-20171209-2) @@ -3968,6 +4170,7 @@ Library needed for GNU Go applications linked against the shared library. +ifenabled(`libdbg',` Package: libgo`'GO_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -3983,6 +4186,7 @@ Library needed for GNU Go applications linked against the shared library. This currently is an empty package, because the library is completely unstripped. +')`'dnl libdbg ')`'dnl libgo ifenabled(`lib64ggo',` @@ -3998,6 +4202,7 @@ Library needed for GNU Go applications linked against the shared library. +ifenabled(`libdbg',` Package: lib64go`'GO_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -4009,6 +4214,7 @@ Library needed for GNU Go applications linked against the shared library. This currently is an empty package, because the library is completely unstripped. +')`'dnl libdbg ')`'dnl lib64go ifenabled(`lib32ggo',` @@ -4025,6 +4231,7 @@ Library needed for GNU Go applications linked against the shared library. +ifenabled(`libdbg',` Package: lib32go`'GO_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -4036,6 +4243,7 @@ Library needed for GNU Go applications linked against the shared library. This currently is an empty package, because the library is completely unstripped. +')`'dnl libdbg ')`'dnl lib32go ifenabled(`libn32ggo',` @@ -4051,6 +4259,7 @@ Library needed for GNU Go applications linked against the shared library. +ifenabled(`libdbg',` Package: libn32go`'GO_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -4062,6 +4271,7 @@ Library needed for GNU Go applications linked against the shared library. This currently is an empty package, because the library is completely unstripped. +')`'dnl libdbg ')`'dnl libn32go ifenabled(`libx32ggo',` @@ -4077,6 +4287,7 @@ Library needed for GNU Go applications linked against the shared library. +ifenabled(`libdbg',` Package: libx32go`'GO_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -4088,6 +4299,7 @@ Library needed for GNU Go applications linked against the shared library. This currently is an empty package, because the library is completely unstripped. +')`'dnl libdbg ')`'dnl libx32go ')`'dnl ggo @@ -4352,9 +4564,15 @@ libstdc++6-4.9-dbg`'LS, libstdc++6-5-dbg`'LS, libstdc++6-6-dbg`'LS, libstdc++6-7-dbg`'LS BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4398,9 +4616,15 @@ lib32stdc++6-4.7-dbg`'LS, lib32stdc++6-4.8-dbg`'LS, lib32stdc++6-4.9-dbg`'LS, lib32stdc++6-5-dbg`'LS, lib32stdc++6-6-dbg`'LS, lib32stdc++6-7-dbg`'LS BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4444,9 +4668,15 @@ lib64stdc++6-4.7-dbg`'LS, lib64stdc++6-4.8-dbg`'LS, lib64stdc++6-4.9-dbg`'LS, lib64stdc++6-5-dbg`'LS, lib64stdc++6-6-dbg`'LS, lib64stdc++6-7-dbg`'LS, BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4490,9 +4720,15 @@ libn32stdc++6-4.7-dbg`'LS, libn32stdc++6-4.8-dbg`'LS, libn32stdc++6-4.9-dbg`'LS, libn32stdc++6-5-dbg`'LS, libn32stdc++6-6-dbg`'LS, libn32stdc++6-7-dbg`'LS, BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4537,9 +4773,15 @@ libx32stdc++6-4.7-dbg`'LS, libx32stdc++6-4.8-dbg`'LS, libx32stdc++6-4.9-dbg`'LS, libx32stdc++6-5-dbg`'LS, libx32stdc++6-6-dbg`'LS, libx32stdc++6-7-dbg`'LS, BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4581,9 +4823,15 @@ ',`')`'dnl ifdef(`TARGET',`dnl',`Conflicts: libhfstdc++6-dbg`'LS, libhfstdc++6-4.3-dbg`'LS, libhfstdc++6-4.4-dbg`'LS, libhfstdc++6-4.5-dbg`'LS, libhfstdc++6-4.6-dbg`'LS, libhfstdc++6-4.7-dbg`'LS, libhfstdc++6-4.8-dbg`'LS, libhfstdc++6-4.9-dbg`'LS, libhfstdc++6-5-dbg`'LS, libhfstdc++6-6-dbg`'LS, libhfstdc++6-7-dbg`'LS, libstdc++'CXX_SO`-armhf [biarchhf_archs]') BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4625,9 +4873,15 @@ ',`')`'dnl ifdef(`TARGET',`dnl',`Conflicts: libsfstdc++6-dbg`'LS, libsfstdc++6-4.3-dbg`'LS, libsfstdc++6-4.4-dbg`'LS, libsfstdc++6-4.5-dbg`'LS, libsfstdc++6-4.6-dbg`'LS, libsfstdc++6-4.7-dbg`'LS, libsfstdc++6-4.8-dbg`'LS, libsfstdc++6-4.9-dbg`'LS, libsfstdc++6-5-dbg`'LS, libhfstdc++6-6-dbg`'LS, libhfstdc++6-7-dbg`'LS, libstdc++'CXX_SO`-armel [biarchsf_archs]') BUILT_USING`'dnl +ifelse(index(enabled_languages, `libdbg'), -1, `dnl +Description: GNU Standard C++ Library v3 (debug build)`'ifdef(`TARGET',` (TARGET)', `') + This package contains a debug build of the shared libstdc++ library. The debug + symbols for the default build can be found in the libstdc++6-dbgsym package. +',`dnl Description: GNU Standard C++ Library v3 (debugging files)`'ifdef(`TARGET',` (TARGET)', `') This package contains the shared library of libstdc++ compiled with debugging symbols. +')`'dnl ifdef(`TARGET', `dnl . This package contains files for TARGET architecture, for use in cross-compile @@ -4727,6 +4981,7 @@ . This package contains the runtime shared library. +ifenabled(`libdbg',` Package: libgnat`'-GNAT_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -4745,6 +5000,7 @@ applications produced with GNAT. . This package contains the debugging symbols. +')`'dnl libdbg ifdef(`TARGET',`',` Package: libgnatvsn`'GNAT_V-dev`'LS @@ -4790,6 +5046,7 @@ . This package contains the runtime shared library. +ifenabled(`libdbg',` Package: libgnatvsn`'GNAT_V-dbg`'LS TARGET_PACKAGE`'dnl Architecture: any @@ -4810,6 +5067,7 @@ GPL, allowing to link proprietary programs with it. . This package contains the debugging symbols. +')`'dnl libdbg ')`'dnl native ')`'dnl libgnat @@ -5003,6 +5261,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: libgphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5017,6 +5276,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg Package: lib64gphobos`'PHOBOS_V`'LS TARGET_PACKAGE`'dnl @@ -5031,6 +5291,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: lib64gphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5043,6 +5304,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg Package: lib32gphobos`'PHOBOS_V`'LS TARGET_PACKAGE`'dnl @@ -5057,6 +5319,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: lib32gphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5069,6 +5332,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg ifenabled(`libn32phobos',` Package: libn32gphobos`'PHOBOS_V`'LS @@ -5083,6 +5347,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: libn32gphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5094,6 +5359,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg ')`'dnl libn32phobos ifenabled(`libx32phobos',` @@ -5110,6 +5376,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: libx32gphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5122,6 +5389,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg ')`'dnl libx32phobos ifenabled(`armml',` @@ -5138,6 +5406,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: libhfgphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5150,6 +5419,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg Package: libsfgphobos`'PHOBOS_V`'LS TARGET_PACKAGE`'dnl @@ -5164,6 +5434,7 @@ . For more information check http://www.dlang.org/phobos/ +ifenabled(`libdbg',` Package: libsfgphobos`'PHOBOS_V-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5176,6 +5447,7 @@ This is the Phobos standard library that comes with the D2 compiler. . For more information check http://www.dlang.org/phobos/ +')`'dnl libdbg ')`'dnl armml ')`'dnl libphobos ')`'dnl d @@ -5191,7 +5463,7 @@ hsail-tools, ${shlibs:Depends}, libidevdep(hsail-rt`'PV-dev,,=), ${misc:Depends} Suggests: ${gccbrig:multilib}, - libdbgdep(hsail-rt`'HSAIL_SO-dbg,) + libdbgdep(hsail-rt`'HSAIL_SO-dbg), Provides: brig-compiler`'TS BUILT_USING`'dnl Description: GNU BRIG (HSA IL) frontend @@ -5361,6 +5633,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: libhsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5378,6 +5651,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl libhsail ifenabled(`lib64hsail',` @@ -5395,6 +5669,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: lib64hsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5408,6 +5683,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl lib64hsail ifenabled(`lib32hsail',` @@ -5426,6 +5702,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: lib32hsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5439,6 +5716,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl lib32hsail ifenabled(`libn32hsail',` @@ -5456,6 +5734,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: libn32hsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5469,6 +5748,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl libn32hsail ifenabled(`libx32hsail',` @@ -5486,6 +5766,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: libx32hsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5499,6 +5780,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl libx32hsail ifenabled(`libhfhsail',` @@ -5517,6 +5799,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: libhfhsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5531,6 +5814,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl libhfhsailrt ifenabled(`libsfhsail',` @@ -5549,6 +5833,7 @@ The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +ifenabled(`libdbg',` Package: libsfhsail-rt`'HSAIL_SO-dbg`'LS TARGET_PACKAGE`'dnl Section: debug @@ -5563,6 +5848,7 @@ . The library contains both the code required to run kernels on the agent and also functions implementing more complex HSAIL instructions. +')`'dnl libdbg ')`'dnl libsfhsailrt ')`'dnl brig diff -u gcc-8-8.3.0/debian/patches/gcc-linaro.diff gcc-8-8.3.0/debian/patches/gcc-linaro.diff --- gcc-8-8.3.0/debian/patches/gcc-linaro.diff +++ gcc-8-8.3.0/debian/patches/gcc-linaro.diff @@ -399,24 +399,6 @@ fi -@@ -18448,7 +18449,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 18451 "configure" -+#line 18452 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -18554,7 +18555,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 18557 "configure" -+#line 18558 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H Index: gcc/builtins.c =================================================================== --- a/src/gcc/builtins.c (.../gcc-8-branch) diff -u gcc-8-8.3.0/debian/patches/svn-updates.diff gcc-8-8.3.0/debian/patches/svn-updates.diff --- gcc-8-8.3.0/debian/patches/svn-updates.diff +++ gcc-8-8.3.0/debian/patches/svn-updates.diff @@ -1,10 +1,10 @@ -# DP: updates from the 8 branch upto 20191008 (r276700). +# DP: updates from the 8 branch upto 20191201 (r278885). last_update() { cat > ${dir}LAST_UPDATED children_dispatches[i]->signal); hsa_fns.hsa_signal_load_acquire_fn (child_s); } +Index: libquadmath/ChangeLog +=================================================================== +--- a/src/libquadmath/ChangeLog (.../tags/gcc_8_3_0_release) ++++ b/src/libquadmath/ChangeLog (.../branches/gcc-8-branch) +@@ -1,3 +1,12 @@ ++2019-11-21 Jakub Jelinek ++ ++ Backported from mainline ++ 2019-08-02 Jakub Jelinek ++ ++ * quadmath.h (M_Eq, M_LOG2Eq, M_LOG10Eq, M_LN2q, M_LN10q, M_PIq, ++ M_PI_2q, M_PI_4q, M_1_PIq, M_2_PIq, M_2_SQRTPIq, M_SQRT2q, ++ M_SQRT1_2q): Use two more decimal places. ++ + 2019-02-22 Release Manager + + * GCC 8.3.0 released. +Index: libquadmath/quadmath.h +=================================================================== +--- a/src/libquadmath/quadmath.h (.../tags/gcc_8_3_0_release) ++++ b/src/libquadmath/quadmath.h (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* GCC Quad-Precision Math Library +- Copyright (C) 2010, 2011 Free Software Foundation, Inc. ++ Copyright (C) 2010-2019 Free Software Foundation, Inc. + Written by Francois-Xavier Coudert + + This file is part of the libquadmath library. +@@ -163,19 +163,19 @@ + (floating constant exceeds range of ‘__float128’) */ + /* #define HUGE_VALQ (__extension__ 0x1.0p32767Q) */ + +-#define M_Eq 2.7182818284590452353602874713526625Q /* e */ +-#define M_LOG2Eq 1.4426950408889634073599246810018921Q /* log_2 e */ +-#define M_LOG10Eq 0.4342944819032518276511289189166051Q /* log_10 e */ +-#define M_LN2q 0.6931471805599453094172321214581766Q /* log_e 2 */ +-#define M_LN10q 2.3025850929940456840179914546843642Q /* log_e 10 */ +-#define M_PIq 3.1415926535897932384626433832795029Q /* pi */ +-#define M_PI_2q 1.5707963267948966192313216916397514Q /* pi/2 */ +-#define M_PI_4q 0.7853981633974483096156608458198757Q /* pi/4 */ +-#define M_1_PIq 0.3183098861837906715377675267450287Q /* 1/pi */ +-#define M_2_PIq 0.6366197723675813430755350534900574Q /* 2/pi */ +-#define M_2_SQRTPIq 1.1283791670955125738961589031215452Q /* 2/sqrt(pi) */ +-#define M_SQRT2q 1.4142135623730950488016887242096981Q /* sqrt(2) */ +-#define M_SQRT1_2q 0.7071067811865475244008443621048490Q /* 1/sqrt(2) */ ++#define M_Eq 2.718281828459045235360287471352662498Q /* e */ ++#define M_LOG2Eq 1.442695040888963407359924681001892137Q /* log_2 e */ ++#define M_LOG10Eq 0.434294481903251827651128918916605082Q /* log_10 e */ ++#define M_LN2q 0.693147180559945309417232121458176568Q /* log_e 2 */ ++#define M_LN10q 2.302585092994045684017991454684364208Q /* log_e 10 */ ++#define M_PIq 3.141592653589793238462643383279502884Q /* pi */ ++#define M_PI_2q 1.570796326794896619231321691639751442Q /* pi/2 */ ++#define M_PI_4q 0.785398163397448309615660845819875721Q /* pi/4 */ ++#define M_1_PIq 0.318309886183790671537767526745028724Q /* 1/pi */ ++#define M_2_PIq 0.636619772367581343075535053490057448Q /* 2/pi */ ++#define M_2_SQRTPIq 1.128379167095512573896158903121545172Q /* 2/sqrt(pi) */ ++#define M_SQRT2q 1.414213562373095048801688724209698079Q /* sqrt(2) */ ++#define M_SQRT1_2q 0.707106781186547524400844362104849039Q /* 1/sqrt(2) */ + + #define __quadmath_extern_inline \ + extern inline __attribute__ ((__gnu_inline__)) Index: libstdc++-v3/configure =================================================================== --- a/src/libstdc++-v3/configure (.../tags/gcc_8_3_0_release) @@ -1495,6 +1556,43 @@ lost, memory debugging tools can report it as a leak. If you want to test the library for memory leaks please read Tips for memory leak hunting +Index: libstdc++-v3/doc/xml/manual/allocator.xml +=================================================================== +--- a/src/libstdc++-v3/doc/xml/manual/allocator.xml (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/doc/xml/manual/allocator.xml (.../branches/gcc-8-branch) +@@ -502,12 +502,12 @@ + + + +- +- <link xmlns:xlink="http://www.w3.org/1999/xlink" +- xlink:href="http://www.drdobbs.com/the-standard-librarian-what-are-allocato/184403759"> ++ <title> ++ <link xmlns:xlink="http://www.w3.org/1999/xlink" ++ xlink:href="https://web.archive.org/web/20190622154249/http://www.drdobbs.com/the-standard-librarian-what-are-allocato/184403759"> + The Standard Librarian: What Are Allocators Good For? +- </link> +- ++ ++ + + MattAustern + +@@ -515,12 +515,13 @@ + C/C++ Users Journal + + ++ 2000-12 + + + + + <link xmlns:xlink="http://www.w3.org/1999/xlink" +- xlink:href="https://www.hoard.org"> ++ xlink:href="http://hoard.org"> + The Hoard Memory Allocator + </link> + Index: libstdc++-v3/doc/xml/manual/intro.xml =================================================================== --- a/src/libstdc++-v3/doc/xml/manual/intro.xml (.../tags/gcc_8_3_0_release) @@ -1782,6 +1880,33 @@
Data Race Hunting All synchronization primitives used in the library internals need to be +Index: libstdc++-v3/doc/xml/manual/documentation_hacking.xml +=================================================================== +--- a/src/libstdc++-v3/doc/xml/manual/documentation_hacking.xml (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/doc/xml/manual/documentation_hacking.xml (.../branches/gcc-8-branch) +@@ -805,7 +805,7 @@ + + + +- Generated files are output into separate sub directores of ++ Generated files are output into separate sub-directores of + doc/docbook/ in the + build directory, based on the output format. For instance, the + HTML docs will be in + + ++ The doc-html-docbook-regenerate target will generate ++ the HTML files and copy them back to the libstdc++ source tree. ++ This can be used to update the HTML files that are checked in to ++ version control. ++ ++ ++ + If the Docbook stylesheets are installed in a custom location, + one can use the variable XSL_STYLE_DIR to + override the Makefile defaults. For example: Index: libstdc++-v3/doc/Makefile.in =================================================================== --- a/src/libstdc++-v3/doc/Makefile.in (.../tags/gcc_8_3_0_release) @@ -1794,6 +1919,27 @@ # Validate existing XML structure. XMLLINT = xmllint +@@ -926,7 +927,6 @@ + + ${docbook_outdir}/html: + mkdir -p ${docbook_outdir}/html +- mkdir -p ${docbook_outdir}/html/ext + mkdir -p ${docbook_outdir}/html/images + mkdir -p ${docbook_outdir}/html/manual + +@@ -978,6 +978,12 @@ + $(STAMP) stamp-html-docbook + + doc-html-docbook: stamp-html-docbook-data ++ ++# Generate the HTML pages and copy them back to the source tree. ++doc-html-docbook-regenerate: doc-html-docbook ++ $(INSTALL_DATA) ${docbook_outdir}/html/*.html ${top_srcdir}/doc/html ++ $(INSTALL_DATA) ${docbook_outdir}/html/images/* ${top_srcdir}/doc/html/images ++ $(INSTALL_DATA) ${docbook_outdir}/html/manual/*.html ${top_srcdir}/doc/html/manual + stamp-html-single-docbook: $(xml_sources) ${docbook_outdir}/html + @echo "Generating html single file..." + $(XSLTPROC) $(XSLT_PARAM) $(XSLT_FLAGS) -o ${manual_html} \ Index: libstdc++-v3/doc/html/faq.html =================================================================== --- a/src/libstdc++-v3/doc/html/faq.html (.../tags/gcc_8_3_0_release) @@ -1984,6 +2130,25 @@ =================================================================== --- a/src/libstdc++-v3/doc/html/manual/memory.html (.../tags/gcc_8_3_0_release) +++ b/src/libstdc++-v3/doc/html/manual/memory.html (.../branches/gcc-8-branch) +@@ -314,13 +314,13 @@ + . + isoc++_1998 + 20.4 Memory.

+- ++ + The Standard Librarian: What Are Allocators Good For? +- +- . Matt Austern. ++ ++ . Matt Austern. + C/C++ Users Journal +- .

@@ -554,7 +554,7 @@ extra template parameter, even if it had a default value. The available policies are: @@ -2030,6 +2195,28 @@ the mt allocator chapter for details.

Error handling in iostreams cleaned up, made consistent.

3.3

+Index: libstdc++-v3/doc/html/manual/documentation_hacking.html +=================================================================== +--- a/src/libstdc++-v3/doc/html/manual/documentation_hacking.html (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/doc/html/manual/documentation_hacking.html (.../branches/gcc-8-branch) +@@ -381,11 +381,16 @@ +

+

make doc-xml-single-docbook

+

+- Generated files are output into separate sub directores of ++ Generated files are output into separate sub-directores of + doc/docbook/ in the + build directory, based on the output format. For instance, the + HTML docs will be in doc/docbook/html. +

++ The

doc-html-docbook-regenerate

target will generate ++ the HTML files and copy them back to the libstdc++ source tree. ++ This can be used to update the HTML files that are checked in to ++ version control. ++

+ If the Docbook stylesheets are installed in a custom location, + one can use the variable XSL_STYLE_DIR to + override the Makefile defaults. For example: Index: libstdc++-v3/doc/html/manual/debug.html =================================================================== --- a/src/libstdc++-v3/doc/html/manual/debug.html (.../tags/gcc_8_3_0_release) @@ -2133,6 +2320,31 @@ Standard Contents

4. Support +Index: libstdc++-v3/doc/Makefile.am +=================================================================== +--- a/src/libstdc++-v3/doc/Makefile.am (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/doc/Makefile.am (.../branches/gcc-8-branch) +@@ -477,7 +477,6 @@ + + ${docbook_outdir}/html: + mkdir -p ${docbook_outdir}/html +- mkdir -p ${docbook_outdir}/html/ext + mkdir -p ${docbook_outdir}/html/images + mkdir -p ${docbook_outdir}/html/manual + +@@ -546,6 +545,12 @@ + + doc-html-docbook: stamp-html-docbook-data + ++# Generate the HTML pages and copy them back to the source tree. ++doc-html-docbook-regenerate: doc-html-docbook ++ $(INSTALL_DATA) ${docbook_outdir}/html/*.html ${top_srcdir}/doc/html ++ $(INSTALL_DATA) ${docbook_outdir}/html/images/* ${top_srcdir}/doc/html/images ++ $(INSTALL_DATA) ${docbook_outdir}/html/manual/*.html ${top_srcdir}/doc/html/manual ++ + # HTML, all one page + # NB: Have to generate customization XSL for UTF-8 output. + manual_html = ${docbook_outdir}/html/libstdc++-manual-single.html Index: libstdc++-v3/po/Makefile.in =================================================================== --- a/src/libstdc++-v3/po/Makefile.in (.../tags/gcc_8_3_0_release) @@ -2969,6 +3181,22 @@ __e = __p; __p = static_cast<_Node*>(__p->_M_next); --__psize; +Index: libstdc++-v3/include/bits/memoryfwd.h +=================================================================== +--- a/src/libstdc++-v3/include/bits/memoryfwd.h (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/include/bits/memoryfwd.h (.../branches/gcc-8-branch) +@@ -66,9 +66,11 @@ + template<> + class allocator; + ++#if __cplusplus >= 201103L + /// Declare uses_allocator so it can be specialized in \ etc. + template + struct uses_allocator; ++#endif + + /// @} group memory + Index: libstdc++-v3/include/bits/uses_allocator.h =================================================================== --- a/src/libstdc++-v3/include/bits/uses_allocator.h (.../tags/gcc_8_3_0_release) @@ -3070,6 +3298,742 @@ static _Base_ptr _S_minimum(_Base_ptr __x) _GLIBCXX_NOEXCEPT +Index: libstdc++-v3/include/tr2/dynamic_bitset.tcc +=================================================================== +--- a/src/libstdc++-v3/include/tr2/dynamic_bitset.tcc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/include/tr2/dynamic_bitset.tcc (.../branches/gcc-8-branch) +@@ -174,7 +174,7 @@ + + // Definitions of non-inline member functions. + template +- template ++ template + void + dynamic_bitset<_WordT, _Alloc>:: + _M_copy_from_ptr(const _CharT* __str, size_t __len, +Index: libstdc++-v3/include/tr2/dynamic_bitset +=================================================================== +--- a/src/libstdc++-v3/include/tr2/dynamic_bitset (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/include/tr2/dynamic_bitset (.../branches/gcc-8-branch) +@@ -34,10 +34,9 @@ + #include + #include + #include +-#include // For std::allocator +-#include // For invalid_argument, out_of_range, +- // overflow_error +-#include ++#include ++#include ++#include // For fill + #include + + namespace std _GLIBCXX_VISIBILITY(default) +@@ -76,41 +75,48 @@ + std::vector _M_w; + + explicit +- __dynamic_bitset_base(const allocator_type& __alloc = allocator_type()) ++ __dynamic_bitset_base(const allocator_type& __alloc) + : _M_w(__alloc) + { } + +- explicit +- __dynamic_bitset_base(__dynamic_bitset_base&& __b) +- { this->_M_w.swap(__b._M_w); } ++ __dynamic_bitset_base() = default; ++ __dynamic_bitset_base(const __dynamic_bitset_base&) = default; ++ __dynamic_bitset_base(__dynamic_bitset_base&& __b) = default; ++ __dynamic_bitset_base& operator=(const __dynamic_bitset_base&) = default; ++ __dynamic_bitset_base& operator=(__dynamic_bitset_base&&) = default; ++ ~__dynamic_bitset_base() = default; + + explicit + __dynamic_bitset_base(size_type __nbits, unsigned long long __val = 0ULL, + const allocator_type& __alloc = allocator_type()) +- : _M_w(__nbits / _S_bits_per_block +- + (__nbits % _S_bits_per_block > 0), +- __val, __alloc) ++ : _M_w(__nbits / _S_bits_per_block + (__nbits % _S_bits_per_block > 0), ++ block_type(0), __alloc) + { +- unsigned long long __mask = ~static_cast(0); +- size_t __n = std::min(this->_M_w.size(), +- sizeof(unsigned long long) / sizeof(block_type)); +- for (size_t __i = 0; __i < __n; ++__i) ++ if (__nbits < std::numeric_limits::digits) ++ __val &= ~(-1ULL << __nbits); ++ if (__val == 0) ++ return; ++ ++ if _GLIBCXX17_CONSTEXPR (sizeof(__val) == sizeof(block_type)) ++ _M_w[0] = __val; ++ else + { +- this->_M_w[__i] = (__val & __mask) >> (__i * _S_bits_per_block); +- __mask <<= _S_bits_per_block; ++ const size_t __n ++ = std::min(_M_w.size(), sizeof(__val) / sizeof(block_type)); ++ for (size_t __i = 0; __val && __i < __n; ++__i) ++ { ++ _M_w[__i] = static_cast(__val); ++ __val >>= _S_bits_per_block; ++ } + } + } + + void +- _M_assign(const __dynamic_bitset_base& __b) +- { this->_M_w = __b._M_w; } +- +- void +- _M_swap(__dynamic_bitset_base& __b) ++ _M_swap(__dynamic_bitset_base& __b) noexcept + { this->_M_w.swap(__b._M_w); } + + void +- _M_clear() ++ _M_clear() noexcept + { this->_M_w.clear(); } + + void +@@ -129,7 +135,7 @@ + } + + allocator_type +- _M_get_allocator() const ++ _M_get_allocator() const noexcept + { return this->_M_w.get_allocator(); } + + static size_type +@@ -149,23 +155,23 @@ + { return (static_cast(1)) << _S_whichbit(__pos); } + + block_type& +- _M_getword(size_type __pos) ++ _M_getword(size_type __pos) noexcept + { return this->_M_w[_S_whichword(__pos)]; } + + block_type +- _M_getword(size_type __pos) const ++ _M_getword(size_type __pos) const noexcept + { return this->_M_w[_S_whichword(__pos)]; } + + block_type& +- _M_hiword() ++ _M_hiword() noexcept + { return this->_M_w[_M_w.size() - 1]; } + + block_type +- _M_hiword() const ++ _M_hiword() const noexcept + { return this->_M_w[_M_w.size() - 1]; } + + void +- _M_do_and(const __dynamic_bitset_base& __x) ++ _M_do_and(const __dynamic_bitset_base& __x) noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +@@ -175,7 +181,7 @@ + } + + void +- _M_do_or(const __dynamic_bitset_base& __x) ++ _M_do_or(const __dynamic_bitset_base& __x) noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +@@ -185,7 +191,7 @@ + } + + void +- _M_do_xor(const __dynamic_bitset_base& __x) ++ _M_do_xor(const __dynamic_bitset_base& __x) noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +@@ -195,7 +201,7 @@ + } + + void +- _M_do_dif(const __dynamic_bitset_base& __x) ++ _M_do_dif(const __dynamic_bitset_base& __x) noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +@@ -211,7 +217,7 @@ + _M_do_right_shift(size_t __shift); + + void +- _M_do_flip() ++ _M_do_flip() noexcept + { + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) + this->_M_w[__i] = ~this->_M_w[__i]; +@@ -218,21 +224,20 @@ + } + + void +- _M_do_set() ++ _M_do_set() noexcept + { + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +- this->_M_w[__i] = ~static_cast(0); ++ this->_M_w[__i] = static_cast(-1); + } + + void +- _M_do_reset() ++ _M_do_reset() noexcept + { +- for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +- this->_M_w[__i] = static_cast(0); ++ std::fill(_M_w.begin(), _M_w.end(), static_cast(0)); + } + + bool +- _M_is_equal(const __dynamic_bitset_base& __x) const ++ _M_is_equal(const __dynamic_bitset_base& __x) const noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + { +@@ -246,7 +251,7 @@ + } + + bool +- _M_is_less(const __dynamic_bitset_base& __x) const ++ _M_is_less(const __dynamic_bitset_base& __x) const noexcept + { + if (__x._M_w.size() == this->_M_w.size()) + { +@@ -264,10 +269,10 @@ + } + + size_t +- _M_are_all_aux() const ++ _M_are_all_aux() const noexcept + { + for (size_t __i = 0; __i < this->_M_w.size() - 1; ++__i) +- if (_M_w[__i] != ~static_cast(0)) ++ if (_M_w[__i] != static_cast(-1)) + return 0; + return ((this->_M_w.size() - 1) * _S_bits_per_block + + __builtin_popcountll(this->_M_hiword())); +@@ -274,7 +279,7 @@ + } + + bool +- _M_is_any() const ++ _M_is_any() const noexcept + { + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) + if (this->_M_w[__i] != static_cast(0)) +@@ -283,7 +288,7 @@ + } + + bool +- _M_is_subset_of(const __dynamic_bitset_base& __b) ++ _M_is_subset_of(const __dynamic_bitset_base& __b) noexcept + { + if (__b._M_w.size() == this->_M_w.size()) + { +@@ -297,7 +302,7 @@ + } + + bool +- _M_is_proper_subset_of(const __dynamic_bitset_base& __b) const ++ _M_is_proper_subset_of(const __dynamic_bitset_base& __b) const noexcept + { + if (this->is_subset_of(__b)) + { +@@ -311,7 +316,7 @@ + } + + size_t +- _M_do_count() const ++ _M_do_count() const noexcept + { + size_t __result = 0; + for (size_t __i = 0; __i < this->_M_w.size(); ++__i) +@@ -357,6 +362,7 @@ + * + * See N2050, + * Proposal to Add a Dynamically Sizeable Bitset to the Standard Library. ++ * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2050.pdf + * + * In the general unoptimized case, storage is allocated in + * word-sized blocks. Let B be the number of bits in a word, then +@@ -435,7 +441,7 @@ + { + size_type __shift = this->_M_Nb % bits_per_block; + if (__shift > 0) +- this->_M_hiword() &= ~((~static_cast(0)) << __shift); ++ this->_M_hiword() &= block_type(~(block_type(-1) << __shift)); + } + + // Set the unused bits in the uppermost word. +@@ -444,7 +450,7 @@ + { + size_type __shift = this->_M_Nb % bits_per_block; + if (__shift > 0) +- this->_M_hiword() |= ((~static_cast(0)) << __shift); ++ this->_M_hiword() |= block_type(block_type(-1) << __shift); + } + + /** +@@ -451,15 +457,15 @@ + * These versions of single-bit set, reset, flip, and test + * do no range checking. + */ +- dynamic_bitset<_WordT, _Alloc>& +- _M_unchecked_set(size_type __pos) ++ dynamic_bitset& ++ _M_unchecked_set(size_type __pos) noexcept + { + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- _M_unchecked_set(size_type __pos, int __val) ++ dynamic_bitset& ++ _M_unchecked_set(size_type __pos, int __val) noexcept + { + if (__val) + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); +@@ -468,15 +474,15 @@ + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- _M_unchecked_reset(size_type __pos) ++ dynamic_bitset& ++ _M_unchecked_reset(size_type __pos) noexcept + { + this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- _M_unchecked_flip(size_type __pos) ++ dynamic_bitset& ++ _M_unchecked_flip(size_type __pos) noexcept + { + this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); + return *this; +@@ -483,11 +489,11 @@ + } + + bool +- _M_unchecked_test(size_type __pos) const ++ _M_unchecked_test(size_type __pos) const noexcept + { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) + != static_cast<_WordT>(0)); } + +- size_type _M_Nb; ++ size_type _M_Nb = 0; + + public: + /** +@@ -511,22 +517,16 @@ + block_type *_M_wp; + size_type _M_bpos; + +- // left undefined +- reference(); +- + public: +- reference(dynamic_bitset& __b, size_type __pos) ++ reference(dynamic_bitset& __b, size_type __pos) noexcept + { + this->_M_wp = &__b._M_getword(__pos); + this->_M_bpos = _Base::_S_whichbit(__pos); + } + +- ~reference() +- { } +- + // For b[i] = __x; + reference& +- operator=(bool __x) ++ operator=(bool __x) noexcept + { + if (__x) + *this->_M_wp |= _Base::_S_maskbit(this->_M_bpos); +@@ -537,7 +537,7 @@ + + // For b[i] = b[__j]; + reference& +- operator=(const reference& __j) ++ operator=(const reference& __j) noexcept + { + if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) + *this->_M_wp |= _Base::_S_maskbit(this->_M_bpos); +@@ -548,16 +548,16 @@ + + // Flips the bit + bool +- operator~() const ++ operator~() const noexcept + { return (*(_M_wp) & _Base::_S_maskbit(this->_M_bpos)) == 0; } + + // For __x = b[i]; +- operator bool() const ++ operator bool() const noexcept + { return (*(this->_M_wp) & _Base::_S_maskbit(this->_M_bpos)) != 0; } + + // For b[i].flip(); + reference& +- flip() ++ flip() noexcept + { + *this->_M_wp ^= _Base::_S_maskbit(this->_M_bpos); + return *this; +@@ -569,10 +569,14 @@ + typedef bool const_reference; + + // 23.3.5.1 constructors: ++ + /// All bits set to zero. ++ dynamic_bitset() = default; ++ ++ /// All bits set to zero. + explicit +- dynamic_bitset(const allocator_type& __alloc = allocator_type()) +- : _Base(__alloc), _M_Nb(0) ++ dynamic_bitset(const allocator_type& __alloc) ++ : _Base(__alloc) + { } + + /// Initial bits bitwise-copied from a single word (others set to zero). +@@ -585,7 +589,7 @@ + + dynamic_bitset(initializer_list __il, + const allocator_type& __alloc = allocator_type()) +- : _Base(__alloc), _M_Nb(0) ++ : _Base(__alloc) + { this->append(__il); } + + /** +@@ -609,8 +613,7 @@ + __n = std::basic_string<_CharT, _Traits, _Alloc1>::npos, + _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'), + const allocator_type& __alloc = allocator_type()) +- : _Base(__alloc), +- _M_Nb(0) // Watch for npos. ++ : _Base(__alloc) + { + if (__pos > __str.size()) + __throw_out_of_range(__N("dynamic_bitset::bitset initial position " +@@ -619,8 +622,7 @@ + // Watch for npos. + this->_M_Nb = (__n > __str.size() ? __str.size() - __pos : __n); + this->resize(this->_M_Nb); +- this->_M_copy_from_string(__str, __pos, __n, +- _CharT('0'), _CharT('1')); ++ this->_M_copy_from_string(__str, __pos, __n); + } + + /** +@@ -633,61 +635,42 @@ + explicit + dynamic_bitset(const char* __str, + const allocator_type& __alloc = allocator_type()) +- : _Base(__alloc) ++ : _Base(__builtin_strlen(__str), 0ULL, __alloc), ++ _M_Nb(__builtin_strlen(__str)) + { +- size_t __len = 0; +- if (__str) +- while (__str[__len] != '\0') +- ++__len; +- this->resize(__len); +- this->_M_copy_from_ptr> +- (__str, __len, 0, __len, '0', '1'); ++ this->_M_copy_from_ptr(__str, _M_Nb, 0, _M_Nb); + } + +- /** +- * @brief Copy constructor. +- */ +- dynamic_bitset(const dynamic_bitset& __b) +- : _Base(__b), _M_Nb(__b.size()) +- { } ++ /// Copy constructor. ++ dynamic_bitset(const dynamic_bitset&) = default; + +- /** +- * @brief Move constructor. +- */ +- dynamic_bitset(dynamic_bitset&& __b) +- : _Base(std::forward<_Base>(__b)), _M_Nb(__b.size()) +- { } ++ /// Move constructor. ++ dynamic_bitset(dynamic_bitset&& __b) noexcept ++ : _Base(std::move(__b)), _M_Nb(__b._M_Nb) ++ { __b.clear(); } + +- /** +- * @brief Swap with another bitset. +- */ ++ /// Swap with another bitset. + void +- swap(dynamic_bitset& __b) ++ swap(dynamic_bitset& __b) noexcept + { + this->_M_swap(__b); + std::swap(this->_M_Nb, __b._M_Nb); + } + +- /** +- * @brief Assignment. +- */ +- dynamic_bitset& +- operator=(const dynamic_bitset& __b) +- { +- if (&__b != this) +- { +- this->_M_assign(__b); +- this->_M_Nb = __b._M_Nb; +- } +- } ++ /// Copy assignment operator. ++ dynamic_bitset& operator=(const dynamic_bitset&) = default; + +- /** +- * @brief Move assignment. +- */ ++ /// Move assignment operator. + dynamic_bitset& + operator=(dynamic_bitset&& __b) ++ noexcept(std::is_nothrow_move_assignable<_Base>::value) + { +- this->swap(__b); ++ static_cast<_Base&>(*this) = static_cast<_Base&&>(__b); ++ _M_Nb = __b._M_Nb; ++ if _GLIBCXX17_CONSTEXPR (std::is_nothrow_move_assignable<_Base>::value) ++ __b._M_Nb = 0; ++ else if (get_allocator() == __b.get_allocator()) ++ __b._M_Nb = 0; + return *this; + } + +@@ -695,7 +678,7 @@ + * @brief Return the allocator for the bitset. + */ + allocator_type +- get_allocator() const ++ get_allocator() const noexcept + { return this->_M_get_allocator(); } + + /** +@@ -733,6 +716,8 @@ + this->_M_unchecked_set(this->_M_Nb, __bit); + } + ++ // XXX why is there no pop_back() member in the proposal? ++ + /** + * @brief Append a block. + */ +@@ -769,36 +754,36 @@ + * + * These should be self-explanatory. + */ +- dynamic_bitset<_WordT, _Alloc>& +- operator&=(const dynamic_bitset<_WordT, _Alloc>& __rhs) ++ dynamic_bitset& ++ operator&=(const dynamic_bitset& __rhs) + { + this->_M_do_and(__rhs); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- operator&=(dynamic_bitset<_WordT, _Alloc>&& __rhs) ++ dynamic_bitset& ++ operator&=(dynamic_bitset&& __rhs) + { + this->_M_do_and(std::move(__rhs)); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- operator|=(const dynamic_bitset<_WordT, _Alloc>& __rhs) ++ dynamic_bitset& ++ operator|=(const dynamic_bitset& __rhs) + { + this->_M_do_or(__rhs); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- operator^=(const dynamic_bitset<_WordT, _Alloc>& __rhs) ++ dynamic_bitset& ++ operator^=(const dynamic_bitset& __rhs) + { + this->_M_do_xor(__rhs); + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& +- operator-=(const dynamic_bitset<_WordT, _Alloc>& __rhs) ++ dynamic_bitset& ++ operator-=(const dynamic_bitset& __rhs) + { + this->_M_do_dif(__rhs); + return *this; +@@ -812,7 +797,7 @@ + * + * These should be self-explanatory. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + operator<<=(size_type __pos) + { + if (__builtin_expect(__pos < this->_M_Nb, 1)) +@@ -825,7 +810,7 @@ + return *this; + } + +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + operator>>=(size_type __pos) + { + if (__builtin_expect(__pos < this->_M_Nb, 1)) +@@ -843,7 +828,7 @@ + /** + * @brief Sets every bit to true. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + set() + { + this->_M_do_set(); +@@ -857,7 +842,7 @@ + * @param __val Either true or false, defaults to true. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + set(size_type __pos, bool __val = true) + { + if (__pos >= _M_Nb) +@@ -868,7 +853,7 @@ + /** + * @brief Sets every bit to false. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + reset() + { + this->_M_do_reset(); +@@ -882,7 +867,7 @@ + * + * Same as writing @c set(__pos, false). + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + reset(size_type __pos) + { + if (__pos >= _M_Nb) +@@ -893,7 +878,7 @@ + /** + * @brief Toggles every bit to its opposite value. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + flip() + { + this->_M_do_flip(); +@@ -906,7 +891,7 @@ + * @param __pos The index of the bit. + * @throw std::out_of_range If @a __pos is bigger the size of the %set. + */ +- dynamic_bitset<_WordT, _Alloc>& ++ dynamic_bitset& + flip(size_type __pos) + { + if (__pos >= _M_Nb) +@@ -915,7 +900,7 @@ + } + + /// See the no-argument flip(). +- dynamic_bitset<_WordT, _Alloc> ++ dynamic_bitset + operator~() const + { return dynamic_bitset<_WordT, _Alloc>(*this).flip(); } + +@@ -977,19 +962,23 @@ + } + + // Helper functions for string operations. +- template ++ template, ++ typename _CharT = typename _Traits::char_type> + void + _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, +- _CharT, _CharT); ++ _CharT __zero = _CharT('0'), ++ _CharT __one = _CharT('1')); + + template + void +- _M_copy_from_string(const std::basic_string<_CharT, +- _Traits, _Alloc1>& __str, size_t __pos, size_t __n, ++ _M_copy_from_string(const basic_string<_CharT, _Traits, _Alloc1>& __str, ++ size_t __pos, size_t __n, + _CharT __zero = _CharT('0'), + _CharT __one = _CharT('1')) +- { _M_copy_from_ptr<_CharT, _Traits>(__str.data(), __str.size(), +- __pos, __n, __zero, __one); } ++ { ++ _M_copy_from_ptr<_Traits>(__str.data(), __str.size(), __pos, __n, ++ __zero, __one); ++ } + + template + void +@@ -1064,13 +1053,13 @@ + + //@{ + /// Self-explanatory. +- dynamic_bitset<_WordT, _Alloc> ++ dynamic_bitset + operator<<(size_type __pos) const +- { return dynamic_bitset<_WordT, _Alloc>(*this) <<= __pos; } ++ { return dynamic_bitset(*this) <<= __pos; } + +- dynamic_bitset<_WordT, _Alloc> ++ dynamic_bitset + operator>>(size_type __pos) const +- { return dynamic_bitset<_WordT, _Alloc>(*this) >>= __pos; } ++ { return dynamic_bitset(*this) >>= __pos; } + //@} + + /** +@@ -1101,14 +1090,14 @@ + { return this->_M_is_proper_subset_of(__b); } + + friend bool +- operator==(const dynamic_bitset<_WordT, _Alloc>& __lhs, +- const dynamic_bitset<_WordT, _Alloc>& __rhs) +- { return __lhs._M_is_equal(__rhs); } ++ operator==(const dynamic_bitset& __lhs, ++ const dynamic_bitset& __rhs) noexcept ++ { return __lhs._M_Nb == __rhs._M_Nb && __lhs._M_is_equal(__rhs); } + + friend bool +- operator<(const dynamic_bitset<_WordT, _Alloc>& __lhs, +- const dynamic_bitset<_WordT, _Alloc>& __rhs) +- { return __lhs._M_is_less(__rhs); } ++ operator<(const dynamic_bitset& __lhs, ++ const dynamic_bitset& __rhs) noexcept ++ { return __lhs._M_is_less(__rhs) || __lhs._M_Nb < __rhs._M_Nb; } + }; + + template Index: libstdc++-v3/libsupc++/Makefile.in =================================================================== --- a/src/libstdc++-v3/libsupc++/Makefile.in (.../tags/gcc_8_3_0_release) @@ -3095,6 +4059,23 @@ + recursive_init_error::~recursive_init_error() noexcept { } } - +Index: libstdc++-v3/libsupc++/new_opa.cc +=================================================================== +--- a/src/libstdc++-v3/libsupc++/new_opa.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/libsupc++/new_opa.cc (.../branches/gcc-8-branch) +@@ -114,9 +114,10 @@ + sz = 1; + + #if _GLIBCXX_HAVE_ALIGNED_ALLOC +-# ifdef _AIX ++# if defined _AIX || defined __APPLE__ + /* AIX 7.2.0.0 aligned_alloc incorrectly has posix_memalign's requirement +- * that alignment is a multiple of sizeof(void*). */ ++ * that alignment is a multiple of sizeof(void*). ++ * OS X 10.15 has the same requirement. */ + if (align < sizeof(void*)) + align = sizeof(void*); + # endif Index: libstdc++-v3/libsupc++/hash_bytes.cc =================================================================== --- a/src/libstdc++-v3/libsupc++/hash_bytes.cc (.../tags/gcc_8_3_0_release) @@ -3154,7 +4135,85 @@ =================================================================== --- a/src/libstdc++-v3/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/libstdc++-v3/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,477 @@ +@@ -1,3 +1,555 @@ ++2019-10-24 Jonathan Wakely ++ ++ Backport from mainline ++ 2019-06-06 Jonathan Wakely ++ ++ * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to ++ void. ++ * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not ++ include Library Fundamentals or Networking headers in C++11 mode. ++ ++ Backport from mainline ++ 2019-10-22 Jonathan Wakely ++ ++ * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98. ++ * testsuite/17_intro/names.cc: Check uses_allocator in C++98. ++ ++ Backport from mainline ++ 2019-10-18 Jonathan Wakely ++ ++ PR libstdc++/92143 ++ * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment ++ to at least sizeof(void*). ++ ++ Backport from mainline ++ 2019-10-08 Jonathan Wakely ++ ++ * doc/Makefile.am (doc-html-docbook-regenerate): New target. ++ (${docbook_outdir}/html): Do not create unused 'html/ext' directory. ++ * doc/Makefile.in: Regenerate. ++ * doc/xml/manual/documentation_hacking.xml: Document new target. ++ * doc/html/*: Regenerate. ++ ++ * doc/xml/manual/allocator.xml: Use archived copy of CUJ article. ++ ++ Backport from mainline ++ 2019-05-31 Gerald Pfeifer ++ ++ * doc/xml/manual/allocator.xml: Move hoard.org back to http. ++ ++ Backport from mainline ++ 2019-10-11 Jonathan Wakely ++ ++ PR libstdc++/92059 ++ * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all ++ special member functions as defaulted. Add noexcept to most members. ++ (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)): ++ Mask off unwanted bits in the __val parameter. Avoid undefined left ++ shifts. ++ (__dynamic_bitset_base::_M_assign): Remove. ++ (__dynamic_bitset_base::_M_do_reset): Use std::fill. ++ (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when ++ block_type has lower rank than int. ++ (dynamic_bitset): Add noexcept to most members. Use injected-class-name ++ in return types and parameter types. ++ (dynamic_bitset::_M_Nb): Add default member initializer. ++ (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as ++ defaulted. ++ (dynamic_bitset(dynamic_bitset&&)): Clear source object after move. ++ (dynamic_bitset::operator=(const dynamic_bitset&)): Define as ++ defaulted. ++ (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier. ++ Define without using swap, to propagate allocator correctly. ++ (dynamic_bitset(const char*, const _Alloc&)): Use strlen. ++ (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use ++ casts to avoid unwanted integer promotions. ++ (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and ++ add default template arguments and default argument to simplify usage. ++ (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr. ++ (operator==(const dynamic_bitset&, const dynamic_bitset&)) ++ (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb. ++ * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr): ++ Adjust template parameters to match declaration. ++ * testsuite/tr2/dynamic_bitset/cmp.cc: New test. ++ * testsuite/tr2/dynamic_bitset/cons.cc: New test. ++ * testsuite/tr2/dynamic_bitset/copy.cc: New test. ++ * testsuite/tr2/dynamic_bitset/move.cc: New test. ++ * testsuite/tr2/dynamic_bitset/pr92059.cc: New test. ++ +2019-09-11 Jonathan Wakely + + * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__): @@ -3671,6 +4730,330 @@ + +#include +int main() { } // PR libstdc++/51333 +Index: libstdc++-v3/testsuite/tr2/dynamic_bitset/cmp.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/cmp.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/cmp.cc (.../branches/gcc-8-branch) +@@ -0,0 +1,50 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ std::tr2::dynamic_bitset<> b = a; ++ VERIFY( a == b ); ++ b.resize(99); ++ VERIFY( a != b ); ++} ++ ++void ++test02() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ std::tr2::dynamic_bitset<> b = a; ++ VERIFY( !(a < b) ); ++ VERIFY( !(b < a) ); ++ b.resize(99); ++ VERIFY( !(a < b) ); ++ VERIFY( b < a ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/tr2/dynamic_bitset/cons.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/cons.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/cons.cc (.../branches/gcc-8-branch) +@@ -0,0 +1,105 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ std::tr2::dynamic_bitset<> a; ++ VERIFY( a.size() == 0 ); ++ VERIFY( a.empty() ); ++ std::tr2::dynamic_bitset<> b(1); ++ VERIFY( b.size() == 1 ); ++ VERIFY( !b.empty() ); ++ VERIFY( a != b ); ++} ++ ++void ++test02() ++{ ++ std::tr2::dynamic_bitset<> a(1, 0); // { 0 } ++ std::tr2::dynamic_bitset<> b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test03() ++{ ++ std::tr2::dynamic_bitset<> a; ++ a.resize(1); // { 0 } ++ std::tr2::dynamic_bitset<> b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test04() ++{ ++ std::tr2::dynamic_bitset<> a(3, 2); // { 0, 1, 0 } ++ std::tr2::dynamic_bitset<> b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test05() ++{ ++ std::tr2::dynamic_bitset a(1, 0); // { 0 } ++ std::tr2::dynamic_bitset b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test06() ++{ ++ std::tr2::dynamic_bitset a; ++ a.resize(1); // { 0 } ++ std::tr2::dynamic_bitset b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test07() ++{ ++ std::tr2::dynamic_bitset a(3, 2); // { 0, 1, 0 } ++ std::tr2::dynamic_bitset b(2, 2); // { 0, 1 } ++ VERIFY( a != b ); ++} ++ ++void ++test08() ++{ ++ std::tr2::dynamic_bitset<> a(65, -1ULL); ++ std::tr2::dynamic_bitset<> b(64, -1ULL); ++ b.push_back(0); ++ VERIFY( a == b ); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++ test03(); ++ test04(); ++ test05(); ++ test06(); ++ test07(); ++ test08(); ++} +Index: libstdc++-v3/testsuite/tr2/dynamic_bitset/move.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/move.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/move.cc (.../branches/gcc-8-branch) +@@ -0,0 +1,53 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ const auto n = a.num_blocks(); ++ std::tr2::dynamic_bitset<> b = std::move(a); ++ VERIFY(b.num_blocks() == n); ++ VERIFY(b.size() == 100); ++ VERIFY(a.num_blocks() == 0); ++ VERIFY(a.size() == 0); ++} ++ ++void ++test02() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ const auto n = a.num_blocks(); ++ std::tr2::dynamic_bitset<> b; ++ b = std::move(a); ++ VERIFY(b.num_blocks() == n); ++ VERIFY(b.size() == 100); ++ VERIFY(a.num_blocks() == 0); ++ VERIFY(a.size() == 0); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/tr2/dynamic_bitset/copy.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/copy.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/copy.cc (.../branches/gcc-8-branch) +@@ -0,0 +1,55 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ const auto n = a.num_blocks(); ++ std::tr2::dynamic_bitset<> b = a; ++ VERIFY(b.num_blocks() == n); ++ VERIFY(b.size() == 100); ++ VERIFY(a.num_blocks() == n); ++ VERIFY(a.size() == 100); ++ VERIFY(b == a); ++} ++ ++void ++test02() ++{ ++ std::tr2::dynamic_bitset<> a(100); ++ const auto n = a.num_blocks(); ++ std::tr2::dynamic_bitset<> b; ++ b = a; ++ VERIFY(b.num_blocks() == n); ++ VERIFY(b.size() == 100); ++ VERIFY(a.num_blocks() == n); ++ VERIFY(a.size() == 100); ++ VERIFY(b == a); ++} ++ ++int ++main() ++{ ++ test01(); ++ test02(); ++} +Index: libstdc++-v3/testsuite/tr2/dynamic_bitset/pr92059.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/pr92059.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/tr2/dynamic_bitset/pr92059.cc (.../branches/gcc-8-branch) +@@ -0,0 +1,36 @@ ++// Copyright (C) 2019 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// . ++ ++// { dg-do run { target c++11 } } ++ ++#include ++#include ++ ++void ++test01() ++{ ++ // PR libstdc++/92059 ++ std::tr2::dynamic_bitset<> b1(10000), b2(10000); ++ b2 = b1; // crashed on missing return ++ VERIFY( b2 == b1); ++} ++ ++int ++main() ++{ ++ test01(); ++} Index: libstdc++-v3/testsuite/23_containers/unordered_map/48101_neg.cc =================================================================== --- a/src/libstdc++-v3/testsuite/23_containers/unordered_map/48101_neg.cc (.../tags/gcc_8_3_0_release) @@ -4638,7 +6021,7 @@ =================================================================== --- a/src/libstdc++-v3/testsuite/experimental/names.cc (.../tags/gcc_8_3_0_release) +++ b/src/libstdc++-v3/testsuite/experimental/names.cc (.../branches/gcc-8-branch) -@@ -0,0 +1,57 @@ +@@ -0,0 +1,62 @@ +// Copyright (C) 2017-2019 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free @@ -4656,7 +6039,7 @@ +// with this library; see the file COPYING3. If not see +// . + -+// { dg-do compile } ++// { dg-do compile { target c++11 } } + +// Define macros for some common variables names that we must not use for +// naming variables, parameters etc. in the library. @@ -4666,6 +6049,9 @@ +#if __has_include() +# include +#endif ++ ++#if __cplusplus >= 201402L ++ +// Library Fundamentals +#include +#include @@ -4696,6 +6082,8 @@ +#include +#include +#include ++ ++#endif // C++14 Index: libstdc++-v3/testsuite/17_intro/names.cc =================================================================== --- a/src/libstdc++-v3/testsuite/17_intro/names.cc (.../tags/gcc_8_3_0_release) @@ -4708,12 +6096,16 @@ #define A ( #define B ( #define C ( -@@ -99,6 +98,78 @@ +@@ -99,6 +98,82 @@ #define y ( #define z ( +#define tmp ( + ++#if __cplusplus < 201103L ++#define uses_allocator ( ++#endif ++ +#if __cplusplus < 201703L +// defines to_chars_result::ptr and to_chars_result::ec +#define ec ( @@ -4787,7 +6179,7 @@ #ifdef _AIX // See https://gcc.gnu.org/ml/libstdc++/2017-03/msg00015.html #undef f -@@ -116,4 +187,9 @@ +@@ -116,4 +191,9 @@ #undef y #endif @@ -5220,6 +6612,38 @@ +static_assert(!std::is_default_constructible::value, "PR c++/90532"); +static_assert(!std::is_default_constructible::value, "PR c++/90532"); +static_assert(!std::is_default_constructible::value, "PR c++/90532"); +Index: libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc +=================================================================== +--- a/src/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc (.../tags/gcc_8_3_0_release) ++++ b/src/libstdc++-v3/testsuite/20_util/is_nothrow_invocable/value.cc (.../branches/gcc-8-branch) +@@ -119,9 +119,11 @@ + static_assert( ! is_nt_invocable_r< T, F >(), "call throws"); + static_assert( ! is_nt_invocable_r< NT, F >(), "call throws"); + static_assert( ! is_nt_invocable_r< Ex, F >(), "call throws"); ++ static_assert( ! is_nt_invocable_r< void, F >(), "call throws"); + static_assert( ! is_nt_invocable_r< T, CF >(), "conversion throws"); + static_assert( is_nt_invocable_r< NT, CF >(), "" ); + static_assert( ! is_nt_invocable_r< Ex, CF >(), "conversion fails"); ++ static_assert( is_nt_invocable_r< void, CF >(), ""); + + static_assert( ! is_nt_invocable< F, int >(), "call throws"); + static_assert( is_nt_invocable< F&, int >(), ""); +@@ -140,6 +142,7 @@ + + static_assert( is_nt_invocable_r< char&, CF, int >(), ""); + static_assert( is_nt_invocable_r< char&, CF&, int >(), ""); ++ static_assert( is_nt_invocable_r< void, CF&, int >(), ""); + + static_assert( ! is_nt_invocable_r< T, CF&, int >(), + "conversion throws"); +@@ -146,6 +149,7 @@ + static_assert( is_nt_invocable_r< NT, CF&, int >(), ""); + static_assert( ! is_nt_invocable_r< Ex, CF&, int >(), + "conversion fails, would use explicit constructor"); ++ static_assert( is_nt_invocable_r< void, CF&, int >(), ""); + + static_assert( ! is_nt_invocable< F, int, int >(), + "would call private member"); Index: libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc =================================================================== --- a/src/libstdc++-v3/testsuite/20_util/optional/constexpr/observers/4.cc (.../tags/gcc_8_3_0_release) @@ -5704,11 +7128,98 @@ #endif #ifdef __x86_64__ +Index: libgcc/config.host +=================================================================== +--- a/src/libgcc/config.host (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config.host (.../branches/gcc-8-branch) +@@ -1018,12 +1018,12 @@ + md_unwind_header=rs6000/darwin-unwind.h + ;; + esac +- tmake_file="$tmake_file rs6000/t-ibm-ldouble" +- extra_parts="$extra_parts crt2.o" ++ tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble" ++ extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc64-*-darwin*) + tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble" +- extra_parts="$extra_parts crt2.o" ++ extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o" + ;; + powerpc*-*-freebsd*) + tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff rs6000/t-freebsd t-softfp-sfdf t-softfp-excl t-softfp" Index: libgcc/ChangeLog =================================================================== --- a/src/libgcc/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/libgcc/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,18 @@ +@@ -1,3 +1,85 @@ ++2019-11-17 John David Anglin ++ ++ * config/pa/linux-atomic.c (__kernel_cmpxchg): Change argument 1 to ++ volatile void *. Remove trap check. ++ (__kernel_cmpxchg2): Likewise. ++ (FETCH_AND_OP_2): Adjust operand types. ++ (OP_AND_FETCH_2): Likewise. ++ (FETCH_AND_OP_WORD): Likewise. ++ (OP_AND_FETCH_WORD): Likewise. ++ (COMPARE_AND_SWAP_2): Likewise. ++ (__sync_val_compare_and_swap_4): Likewise. ++ (__sync_bool_compare_and_swap_4): Likewise. ++ (SYNC_LOCK_TEST_AND_SET_2): Likewise. ++ (__sync_lock_test_and_set_4): Likewise. ++ (SYNC_LOCK_RELEASE_1): Likewise. Use __kernel_cmpxchg2 for release. ++ (__sync_lock_release_4): Adjust operand types. Use __kernel_cmpxchg ++ for release. ++ (__sync_lock_release_8): Remove. ++ ++2019-11-04 John David Anglin ++ ++ Backport from mainline ++ 2019-10-12 John David Anglin ++ ++ * config/pa/lib2funcs.S (__gcc_plt_call): Load branch target to %r21. ++ Load PIC register after branch target. Fix white space. ++ * config/pa/milli64.S ($$dyncall): Separate LINUX and non LINUX ++ implementations. Load PIC register after branch target. Don't ++ clobber function pointer when it points to function descriptor. ++ Use nullification instead of branch in LINUX implementation. ++ ++2019-11-04 John David Anglin ++ ++ Backport from mainline ++ 2019-10-15 John David Anglin ++ ++ * config/pa/fptr.c (_dl_read_access_allowed): Change argument to ++ unsigned int. Adjust callers. ++ (__canonicalize_funcptr_for_compare): Change plabel type to volatile ++ unsigned int *. Load relocation offset before function pointer. ++ Add barrier to ensure ordering. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-07-03 Iain Sandoe ++ ++ * config.host (powerpc-*-darwin*,powerpc64-*-darwin*): Revise crt ++ list. ++ * config/rs6000/t-darwin: Build crt3_2 for older systems. Revise ++ mmacosx-version-min for crts to run across all system versions. ++ * config/rs6000/t-darwin64 (LIB2ADD): Remove. ++ * config/t-darwin: Revise mmacosx-version-min for crts to run across ++ system versions >= 10.4. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-06-25 Iain Sandoe ++ ++ * config.host: Add libef_ppc.a to the extra files for powerpc-darwin. ++ * config/rs6000/t-darwin: (PPC_ENDFILE_SRC, PPC_ENDFILE_OBJS): New. ++ Build objects for the out of line save/restore register functions ++ so that they can be used for any supported Darwin version. ++ * config/t-darwin: Default the build Darwin version to Darwin8 ++ (MacOS 10.4). ++ +2019-08-27 Iain Sandoe + + Backport from mainline. @@ -5727,18 +7238,124 @@ 2019-02-22 Release Manager * GCC 8.3.0 released. +Index: libgcc/config/t-darwin +=================================================================== +--- a/src/libgcc/config/t-darwin (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/t-darwin (.../branches/gcc-8-branch) +@@ -1,22 +1,16 @@ + # Set this as a minimum (unless overriden by arch t-files) since it's a + # reasonable lowest common denominator that works for all our archs. +-HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.5 ++HOST_LIBGCC2_CFLAGS += -mmacosx-version-min=10.4 + + crt3.o: $(srcdir)/config/darwin-crt3.c +- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $< ++ $(crt_compile) -mmacosx-version-min=10.4 -c $< + + crttms.o: $(srcdir)/config/darwin-crt-tm.c +- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DSTART -c $< ++ $(crt_compile) -mmacosx-version-min=10.4 -DSTART -c $< + + crttme.o: $(srcdir)/config/darwin-crt-tm.c +- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $< ++ $(crt_compile) -mmacosx-version-min=10.4 -DEND -c $< + +-# -pipe because there's an assembler bug, 4077127, which causes +-# it to not properly process the first # directive, causing temporary +-# file names to appear in stabs, causing the bootstrap to fail. Using -pipe +-# works around this by not having any temporary file names. +-HOST_LIBGCC2_CFLAGS += -pipe +- + # Use unwind-dw2-fde-darwin + LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \ + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c Index: libgcc/config/rs6000/t-darwin =================================================================== --- a/src/libgcc/config/rs6000/t-darwin (.../tags/gcc_8_3_0_release) +++ b/src/libgcc/config/rs6000/t-darwin (.../branches/gcc-8-branch) -@@ -20,4 +20,7 @@ - # earlier OSX versions. - HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL -mmacosx-version-min=10.4 +@@ -1,23 +1,58 @@ +-DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4 + crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c +- $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $< ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< + ++# The sources for this indicate that there are some parts that ++# don't apply >= 10.4 ++crt3_2.o: $(srcdir)/config/darwin-crt3.c ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< ++ ++# The outlined register save/restore functions need to run anywhere, and ++# they must be leaf functions suitable for use in an endfile. ++ ++PPC_ENDFILE_SRC = \ ++ $(srcdir)/config/rs6000/darwin-gpsave.S \ ++ $(srcdir)/config/rs6000/darwin-fpsave.S \ ++ $(srcdir)/config/rs6000/darwin-vecsave.S ++ ++PPC_ENDFILE_OBJS = \ ++ darwin-gpsave.o \ ++ darwin-fpsave.o \ ++ darwin-vecsave.o ++ ++darwin-gpsave.o: $(srcdir)/config/rs6000/darwin-gpsave.S ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< ++ ++darwin-fpsave.o: $(srcdir)/config/rs6000/darwin-fpsave.S ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< ++ ++darwin-vecsave.o: $(srcdir)/config/rs6000/darwin-vecsave.S ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< ++ ++# We build these into a library, so that they are only linked as needed and not ++# forced into every object. ++ ++libef_ppc.a: $(PPC_ENDFILE_OBJS) ++ $(AR_CREATE_FOR_TARGET) $@ $(PPC_ENDFILE_OBJS) ++ $(RANLIB_FOR_TARGET) $@ ++ ++dw_ppc.o: $(srcdir)/config/rs6000/darwin-world.S ++ $(crt_compile) -mmacosx-version-min=10.1 -c $< ++ + LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \ + $(srcdir)/config/darwin-64.c \ +- $(srcdir)/config/rs6000/darwin-fpsave.S \ +- $(srcdir)/config/rs6000/darwin-gpsave.S \ +- $(srcdir)/config/rs6000/darwin-world.S \ +- $(srcdir)/config/rs6000/ppc64-fp.c ++ $(srcdir)/config/rs6000/darwin-world.S + +-LIB2ADD_ST = \ +- $(srcdir)/config/rs6000/darwin-vecsave.S +- + # The .S files above are designed to run on all processors, even though + # they use AltiVec instructions. + # -Wa is used because -force_cpusubtype_ALL doesn't work with -dynamiclib. +-# -mmacosx-version-min=10.4 is used to provide compatibility for code from +-# earlier OSX versions. +-HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL -mmacosx-version-min=10.4 + ++HOST_LIBGCC2_CFLAGS += -Wa,-force_cpusubtype_ALL ++ ++# Although the default for 10.4 is G3, we need the unwinder to be built ++# with vector support so that the "save/rest_world" outlined functions are ++# correctly invoked. +unwind-dw2_s.o: HOST_LIBGCC2_CFLAGS += -maltivec +unwind-dw2.o: HOST_LIBGCC2_CFLAGS += -maltivec + LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c +Index: libgcc/config/rs6000/t-darwin64 +=================================================================== +--- a/src/libgcc/config/rs6000/t-darwin64 (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/rs6000/t-darwin64 (.../branches/gcc-8-branch) +@@ -1,7 +1 @@ + LIB2_SIDITI_CONV_FUNCS = yes +- +-LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \ +- $(srcdir)/config/darwin-64.c \ +- $(srcdir)/config/rs6000/darwin-fpsave.S \ +- $(srcdir)/config/rs6000/darwin-gpsave.S \ +- $(srcdir)/config/rs6000/darwin-world.S Index: libgcc/config/rs6000/darwin-vecsave.S =================================================================== --- a/src/libgcc/config/rs6000/darwin-vecsave.S (.../tags/gcc_8_3_0_release) @@ -5759,38 +7376,543 @@ .align 2 .private_extern saveVEC -Index: gcc/attribs.c +Index: libgcc/config/pa/milli64.S =================================================================== ---- a/src/gcc/attribs.c (.../tags/gcc_8_3_0_release) -+++ b/src/gcc/attribs.c (.../branches/gcc-8-branch) -@@ -1685,8 +1685,11 @@ - a function global scope, unless declared static. */ - if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) - TREE_PUBLIC (node) = 1; -- /* Clear TREE_STATIC because DECL_EXTERNAL is set. */ -- TREE_STATIC (node) = 0; -+ /* Clear TREE_STATIC because DECL_EXTERNAL is set, unless -+ it is a C++ static data member. */ -+ if (DECL_CONTEXT (node) == NULL_TREE -+ || !RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (node))) -+ TREE_STATIC (node) = 0; - } - - if (*no_add_attrs == false) -Index: gcc/opts-common.c +--- a/src/libgcc/config/pa/milli64.S (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/pa/milli64.S (.../branches/gcc-8-branch) +@@ -222,19 +222,26 @@ + .proc + .callinfo millicode + .entry ++#ifdef LINUX ++ extru,<> %r22,30,1,%r0 ; nullify if plabel bit set ++ bv,n %r0(%r22) ; branch to target ++ ldw -2(%r22),%r21 ; load address of target ++ bv %r0(%r21) ; branch to the real target ++ ldw 2(%r22),%r19 ; load new LTP value ++#else + bb,>=,n %r22,30,LREF(1) ; branch if not plabel address +- depi 0,31,2,%r22 ; clear the two least significant bits +- ldw 4(%r22),%r19 ; load new LTP value +- ldw 0(%r22),%r22 ; load address of target ++ ldw -2(%r22),%r21 ; load address of target to r21 ++ ldsid (%sr0,%r21),%r1 ; get the "space ident" selected by r21 ++ ldw 2(%r22),%r19 ; load new LTP value ++ mtsp %r1,%sr0 ; move that space identifier into sr0 ++ be 0(%sr0,%r21) ; branch to the real target ++ stw %r2,-24(%r30) ; save return address into frame marker + LSYM(1) +-#ifdef LINUX +- bv %r0(%r22) ; branch to the real target +-#else + ldsid (%sr0,%r22),%r1 ; get the "space ident" selected by r22 + mtsp %r1,%sr0 ; move that space identifier into sr0 +- be 0(%sr0,%r22) ; branch to the real target ++ be 0(%sr0,%r22) ; branch to the target ++ stw %r2,-24(%r30) ; save return address into frame marker + #endif +- stw %r2,-24(%r30) ; save return address into frame marker + .exit + .procend + #endif +Index: libgcc/config/pa/lib2funcs.S =================================================================== ---- a/src/gcc/opts-common.c (.../tags/gcc_8_3_0_release) -+++ b/src/gcc/opts-common.c (.../branches/gcc-8-branch) -@@ -463,7 +463,8 @@ +--- a/src/libgcc/config/pa/lib2funcs.S (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/pa/lib2funcs.S (.../branches/gcc-8-branch) +@@ -55,13 +55,13 @@ + ; An inline version of dyncall so we don't have to worry + ; about long calls to millicode, PIC and other complexities. + bb,>=,n %r22,30,L$foo +- depi 0,31,2,%r22 +- ldw 4(%r22),%r19 +- ldw 0(%r22),%r22 ++ depi 0,31,2,%r22 ++ ldw 0(%r22),%r21 ++ ldw 4(%r22),%r19 + L$foo +- ldsid (%r22),%r1 +- mtsp %r1,%sr0 +- ble 0(%sr0,%r22) ++ ldsid (%r21),%r1 ++ mtsp %r1,%sr0 ++ ble 0(%sr0,%r21) + copy %r31,%r2 + ldw -8(%r30),%r2 + +Index: libgcc/config/pa/linux-atomic.c +=================================================================== +--- a/src/libgcc/config/pa/linux-atomic.c (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/pa/linux-atomic.c (.../branches/gcc-8-branch) +@@ -41,7 +41,7 @@ + + /* Kernel helper for compare-and-exchange a 32-bit value. */ + static inline long +-__kernel_cmpxchg (int *mem, int oldval, int newval) ++__kernel_cmpxchg (volatile void *mem, int oldval, int newval) + { + register unsigned long lws_mem asm("r26") = (unsigned long) (mem); + register int lws_old asm("r25") = oldval; +@@ -54,20 +54,18 @@ + : "i" (LWS_CAS), "r" (lws_mem), "r" (lws_old), "r" (lws_new) + : "r1", "r20", "r22", "r23", "r29", "r31", "memory" + ); +- if (__builtin_expect (lws_errno == -EFAULT || lws_errno == -ENOSYS, 0)) +- __builtin_trap (); + + /* If the kernel LWS call succeeded (lws_errno == 0), lws_ret contains + the old value from memory. If this value is equal to OLDVAL, the + new value was written to memory. If not, return -EBUSY. */ + if (!lws_errno && lws_ret != oldval) +- lws_errno = -EBUSY; ++ return -EBUSY; + + return lws_errno; + } + + static inline long +-__kernel_cmpxchg2 (void *mem, const void *oldval, const void *newval, ++__kernel_cmpxchg2 (volatile void *mem, const void *oldval, const void *newval, + int val_size) + { + register unsigned long lws_mem asm("r26") = (unsigned long) (mem); +@@ -88,9 +86,6 @@ + if (__builtin_expect (lws_ret == 0, 1)) + return 0; - extra_args = 0; +- if (__builtin_expect (lws_errno == -EFAULT || lws_errno == -ENOSYS, 0)) +- __builtin_trap (); +- + /* If the kernel LWS call fails with no error, return -EBUSY */ + if (__builtin_expect (!lws_errno, 0)) + return -EBUSY; +@@ -108,13 +103,13 @@ + + #define FETCH_AND_OP_2(OP, PFX_OP, INF_OP, TYPE, WIDTH, INDEX) \ + TYPE HIDDEN \ +- __sync_fetch_and_##OP##_##WIDTH (TYPE *ptr, TYPE val) \ ++ __sync_fetch_and_##OP##_##WIDTH (volatile void *ptr, TYPE val) \ + { \ + TYPE tmp, newval; \ + long failure; \ + \ + do { \ +- tmp = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ tmp = __atomic_load_n ((volatile TYPE *)ptr, __ATOMIC_RELAXED); \ + newval = PFX_OP (tmp INF_OP val); \ + failure = __kernel_cmpxchg2 (ptr, &tmp, &newval, INDEX); \ + } while (failure != 0); \ +@@ -122,36 +117,36 @@ + return tmp; \ + } -- opt_index = find_opt (argv[0] + 1, lang_mask); -+ const char *opt_value = argv[0] + 1; -+ opt_index = find_opt (opt_value, lang_mask); - i = 0; - while (opt_index == OPT_SPECIAL_unknown - && i < ARRAY_SIZE (option_map)) +-FETCH_AND_OP_2 (add, , +, long long, 8, 3) +-FETCH_AND_OP_2 (sub, , -, long long, 8, 3) +-FETCH_AND_OP_2 (or, , |, long long, 8, 3) +-FETCH_AND_OP_2 (and, , &, long long, 8, 3) +-FETCH_AND_OP_2 (xor, , ^, long long, 8, 3) +-FETCH_AND_OP_2 (nand, ~, &, long long, 8, 3) ++FETCH_AND_OP_2 (add, , +, long long unsigned int, 8, 3) ++FETCH_AND_OP_2 (sub, , -, long long unsigned int, 8, 3) ++FETCH_AND_OP_2 (or, , |, long long unsigned int, 8, 3) ++FETCH_AND_OP_2 (and, , &, long long unsigned int, 8, 3) ++FETCH_AND_OP_2 (xor, , ^, long long unsigned int, 8, 3) ++FETCH_AND_OP_2 (nand, ~, &, long long unsigned int, 8, 3) + +-FETCH_AND_OP_2 (add, , +, short, 2, 1) +-FETCH_AND_OP_2 (sub, , -, short, 2, 1) +-FETCH_AND_OP_2 (or, , |, short, 2, 1) +-FETCH_AND_OP_2 (and, , &, short, 2, 1) +-FETCH_AND_OP_2 (xor, , ^, short, 2, 1) +-FETCH_AND_OP_2 (nand, ~, &, short, 2, 1) ++FETCH_AND_OP_2 (add, , +, short unsigned int, 2, 1) ++FETCH_AND_OP_2 (sub, , -, short unsigned int, 2, 1) ++FETCH_AND_OP_2 (or, , |, short unsigned int, 2, 1) ++FETCH_AND_OP_2 (and, , &, short unsigned int, 2, 1) ++FETCH_AND_OP_2 (xor, , ^, short unsigned int, 2, 1) ++FETCH_AND_OP_2 (nand, ~, &, short unsigned int, 2, 1) + +-FETCH_AND_OP_2 (add, , +, signed char, 1, 0) +-FETCH_AND_OP_2 (sub, , -, signed char, 1, 0) +-FETCH_AND_OP_2 (or, , |, signed char, 1, 0) +-FETCH_AND_OP_2 (and, , &, signed char, 1, 0) +-FETCH_AND_OP_2 (xor, , ^, signed char, 1, 0) +-FETCH_AND_OP_2 (nand, ~, &, signed char, 1, 0) ++FETCH_AND_OP_2 (add, , +, unsigned char, 1, 0) ++FETCH_AND_OP_2 (sub, , -, unsigned char, 1, 0) ++FETCH_AND_OP_2 (or, , |, unsigned char, 1, 0) ++FETCH_AND_OP_2 (and, , &, unsigned char, 1, 0) ++FETCH_AND_OP_2 (xor, , ^, unsigned char, 1, 0) ++FETCH_AND_OP_2 (nand, ~, &, unsigned char, 1, 0) + + #define OP_AND_FETCH_2(OP, PFX_OP, INF_OP, TYPE, WIDTH, INDEX) \ + TYPE HIDDEN \ +- __sync_##OP##_and_fetch_##WIDTH (TYPE *ptr, TYPE val) \ ++ __sync_##OP##_and_fetch_##WIDTH (volatile void *ptr, TYPE val) \ + { \ + TYPE tmp, newval; \ + long failure; \ + \ + do { \ +- tmp = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ tmp = __atomic_load_n ((volatile TYPE *)ptr, __ATOMIC_RELAXED); \ + newval = PFX_OP (tmp INF_OP val); \ + failure = __kernel_cmpxchg2 (ptr, &tmp, &newval, INDEX); \ + } while (failure != 0); \ +@@ -159,36 +154,37 @@ + return PFX_OP (tmp INF_OP val); \ + } + +-OP_AND_FETCH_2 (add, , +, long long, 8, 3) +-OP_AND_FETCH_2 (sub, , -, long long, 8, 3) +-OP_AND_FETCH_2 (or, , |, long long, 8, 3) +-OP_AND_FETCH_2 (and, , &, long long, 8, 3) +-OP_AND_FETCH_2 (xor, , ^, long long, 8, 3) +-OP_AND_FETCH_2 (nand, ~, &, long long, 8, 3) ++OP_AND_FETCH_2 (add, , +, long long unsigned int, 8, 3) ++OP_AND_FETCH_2 (sub, , -, long long unsigned int, 8, 3) ++OP_AND_FETCH_2 (or, , |, long long unsigned int, 8, 3) ++OP_AND_FETCH_2 (and, , &, long long unsigned int, 8, 3) ++OP_AND_FETCH_2 (xor, , ^, long long unsigned int, 8, 3) ++OP_AND_FETCH_2 (nand, ~, &, long long unsigned int, 8, 3) + +-OP_AND_FETCH_2 (add, , +, short, 2, 1) +-OP_AND_FETCH_2 (sub, , -, short, 2, 1) +-OP_AND_FETCH_2 (or, , |, short, 2, 1) +-OP_AND_FETCH_2 (and, , &, short, 2, 1) +-OP_AND_FETCH_2 (xor, , ^, short, 2, 1) +-OP_AND_FETCH_2 (nand, ~, &, short, 2, 1) ++OP_AND_FETCH_2 (add, , +, short unsigned int, 2, 1) ++OP_AND_FETCH_2 (sub, , -, short unsigned int, 2, 1) ++OP_AND_FETCH_2 (or, , |, short unsigned int, 2, 1) ++OP_AND_FETCH_2 (and, , &, short unsigned int, 2, 1) ++OP_AND_FETCH_2 (xor, , ^, short unsigned int, 2, 1) ++OP_AND_FETCH_2 (nand, ~, &, short unsigned int, 2, 1) + +-OP_AND_FETCH_2 (add, , +, signed char, 1, 0) +-OP_AND_FETCH_2 (sub, , -, signed char, 1, 0) +-OP_AND_FETCH_2 (or, , |, signed char, 1, 0) +-OP_AND_FETCH_2 (and, , &, signed char, 1, 0) +-OP_AND_FETCH_2 (xor, , ^, signed char, 1, 0) +-OP_AND_FETCH_2 (nand, ~, &, signed char, 1, 0) ++OP_AND_FETCH_2 (add, , +, unsigned char, 1, 0) ++OP_AND_FETCH_2 (sub, , -, unsigned char, 1, 0) ++OP_AND_FETCH_2 (or, , |, unsigned char, 1, 0) ++OP_AND_FETCH_2 (and, , &, unsigned char, 1, 0) ++OP_AND_FETCH_2 (xor, , ^, unsigned char, 1, 0) ++OP_AND_FETCH_2 (nand, ~, &, unsigned char, 1, 0) + + #define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ +- int HIDDEN \ +- __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ unsigned int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (volatile void *ptr, unsigned int val) \ + { \ +- int tmp; \ ++ unsigned int tmp; \ + long failure; \ + \ + do { \ +- tmp = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ tmp = __atomic_load_n ((volatile unsigned int *)ptr, \ ++ __ATOMIC_RELAXED); \ + failure = __kernel_cmpxchg (ptr, tmp, PFX_OP (tmp INF_OP val)); \ + } while (failure != 0); \ + \ +@@ -203,14 +199,15 @@ + FETCH_AND_OP_WORD (nand, ~, &) + + #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ +- int HIDDEN \ +- __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ unsigned int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (volatile void *ptr, unsigned int val) \ + { \ +- int tmp; \ ++ unsigned int tmp; \ + long failure; \ + \ + do { \ +- tmp = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ tmp = __atomic_load_n ((volatile unsigned int *)ptr, \ ++ __ATOMIC_RELAXED); \ + failure = __kernel_cmpxchg (ptr, tmp, PFX_OP (tmp INF_OP val)); \ + } while (failure != 0); \ + \ +@@ -228,7 +225,7 @@ + + #define COMPARE_AND_SWAP_2(TYPE, WIDTH, INDEX) \ + TYPE HIDDEN \ +- __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ __sync_val_compare_and_swap_##WIDTH (volatile void *ptr, TYPE oldval, \ + TYPE newval) \ + { \ + TYPE actual_oldval; \ +@@ -236,7 +233,8 @@ + \ + while (1) \ + { \ +- actual_oldval = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ actual_oldval = __atomic_load_n ((volatile TYPE *)ptr, \ ++ __ATOMIC_RELAXED); \ + \ + if (__builtin_expect (oldval != actual_oldval, 0)) \ + return actual_oldval; \ +@@ -248,27 +246,29 @@ + } \ + } \ + \ +- bool HIDDEN \ +- __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ +- TYPE newval) \ ++ _Bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (volatile void *ptr, \ ++ TYPE oldval, TYPE newval) \ + { \ + long failure = __kernel_cmpxchg2 (ptr, &oldval, &newval, INDEX); \ + return (failure == 0); \ + } + +-COMPARE_AND_SWAP_2 (long long, 8, 3) +-COMPARE_AND_SWAP_2 (short, 2, 1) +-COMPARE_AND_SWAP_2 (char, 1, 0) ++COMPARE_AND_SWAP_2 (long long unsigned int, 8, 3) ++COMPARE_AND_SWAP_2 (short unsigned int, 2, 1) ++COMPARE_AND_SWAP_2 (unsigned char, 1, 0) + +-int HIDDEN +-__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++unsigned int HIDDEN ++__sync_val_compare_and_swap_4 (volatile void *ptr, unsigned int oldval, ++ unsigned int newval) + { + long fail; +- int actual_oldval; ++ unsigned int actual_oldval; + + while (1) + { +- actual_oldval = __atomic_load_n (ptr, __ATOMIC_RELAXED); ++ actual_oldval = __atomic_load_n ((volatile unsigned int *)ptr, ++ __ATOMIC_RELAXED); + + if (__builtin_expect (oldval != actual_oldval, 0)) + return actual_oldval; +@@ -280,8 +280,9 @@ + } + } + +-bool HIDDEN +-__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++_Bool HIDDEN ++__sync_bool_compare_and_swap_4 (volatile void *ptr, unsigned int oldval, ++ unsigned int newval) + { + long failure = __kernel_cmpxchg (ptr, oldval, newval); + return (failure == 0); +@@ -289,13 +290,14 @@ + + #define SYNC_LOCK_TEST_AND_SET_2(TYPE, WIDTH, INDEX) \ + TYPE HIDDEN \ +- __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ __sync_lock_test_and_set_##WIDTH (volatile void *ptr, TYPE val) \ + { \ + TYPE oldval; \ + long failure; \ + \ + do { \ +- oldval = __atomic_load_n (ptr, __ATOMIC_RELAXED); \ ++ oldval = __atomic_load_n ((volatile TYPE *)ptr, \ ++ __ATOMIC_RELAXED); \ + failure = __kernel_cmpxchg2 (ptr, &oldval, &val, INDEX); \ + } while (failure != 0); \ + \ +@@ -302,18 +304,18 @@ + return oldval; \ + } + +-SYNC_LOCK_TEST_AND_SET_2 (long long, 8, 3) +-SYNC_LOCK_TEST_AND_SET_2 (short, 2, 1) +-SYNC_LOCK_TEST_AND_SET_2 (signed char, 1, 0) ++SYNC_LOCK_TEST_AND_SET_2 (long long unsigned int, 8, 3) ++SYNC_LOCK_TEST_AND_SET_2 (short unsigned int, 2, 1) ++SYNC_LOCK_TEST_AND_SET_2 (unsigned char, 1, 0) + +-int HIDDEN +-__sync_lock_test_and_set_4 (int *ptr, int val) ++unsigned int HIDDEN ++__sync_lock_test_and_set_4 (volatile void *ptr, unsigned int val) + { + long failure; +- int oldval; ++ unsigned int oldval; + + do { +- oldval = __atomic_load_n (ptr, __ATOMIC_RELAXED); ++ oldval = __atomic_load_n ((volatile unsigned int *)ptr, __ATOMIC_RELAXED); + failure = __kernel_cmpxchg (ptr, oldval, val); + } while (failure != 0); + +@@ -320,24 +322,32 @@ + return oldval; + } + +-void HIDDEN +-__sync_lock_release_8 (long long *ptr) +-{ +- /* All accesses must be complete before we release the lock. */ +- __sync_synchronize (); +- *(double *)ptr = 0; +-} +- +-#define SYNC_LOCK_RELEASE_1(TYPE, WIDTH) \ ++#define SYNC_LOCK_RELEASE_1(TYPE, WIDTH, INDEX) \ + void HIDDEN \ +- __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ __sync_lock_release_##WIDTH (volatile void *ptr) \ + { \ +- /* All accesses must be complete before we release \ +- the lock. */ \ +- __sync_synchronize (); \ +- *ptr = 0; \ ++ TYPE oldval, val = 0; \ ++ long failure; \ ++ \ ++ do { \ ++ oldval = __atomic_load_n ((volatile TYPE *)ptr, \ ++ __ATOMIC_RELAXED); \ ++ failure = __kernel_cmpxchg2 (ptr, &oldval, &val, INDEX); \ ++ } while (failure != 0); \ + } + +-SYNC_LOCK_RELEASE_1 (int, 4) +-SYNC_LOCK_RELEASE_1 (short, 2) +-SYNC_LOCK_RELEASE_1 (signed char, 1) ++SYNC_LOCK_RELEASE_1 (long long unsigned int, 8, 3) ++SYNC_LOCK_RELEASE_1 (short unsigned int, 2, 1) ++SYNC_LOCK_RELEASE_1 (unsigned char, 1, 0) ++ ++void HIDDEN ++__sync_lock_release_4 (volatile void *ptr) ++{ ++ long failure; ++ unsigned int oldval; ++ ++ do { ++ oldval = __atomic_load_n ((volatile unsigned int *)ptr, __ATOMIC_RELAXED); ++ failure = __kernel_cmpxchg (ptr, oldval, 0); ++ } while (failure != 0); ++} +Index: libgcc/config/pa/fptr.c +=================================================================== +--- a/src/libgcc/config/pa/fptr.c (.../tags/gcc_8_3_0_release) ++++ b/src/libgcc/config/pa/fptr.c (.../branches/gcc-8-branch) +@@ -53,7 +53,7 @@ + extern unsigned int _GLOBAL_OFFSET_TABLE_; + + static inline int +-_dl_read_access_allowed (unsigned int *addr) ++_dl_read_access_allowed (unsigned int addr) + { + int result; + +@@ -76,7 +76,8 @@ + { + static unsigned int fixup_plabel[2] __attribute__((used)); + fixup_t fixup; +- unsigned int *got, *iptr, *plabel; ++ volatile unsigned int *plabel; ++ unsigned int *got, *iptr, reloc_offset; + int i; + + /* -1 and page 0 are special. -1 is used in crtend to mark the end of +@@ -91,8 +92,8 @@ + to the entry of the PLT stub just before the global offset table. + The second word in the plabel contains the relocation offset for the + function. */ +- plabel = (unsigned int *) ((unsigned int) fptr & ~3); +- if (!_dl_read_access_allowed (plabel)) ++ plabel = (volatile unsigned int *) ((unsigned int) fptr & ~3); ++ if (!_dl_read_access_allowed ((unsigned int)plabel)) + return (unsigned int) fptr; + + /* Load first word of candidate descriptor. It should be a pointer +@@ -99,9 +100,12 @@ + with word alignment and point to memory that can be read. */ + got = (unsigned int *) plabel[0]; + if (((unsigned int) got & 3) != 0 +- || !_dl_read_access_allowed (got)) ++ || !_dl_read_access_allowed ((unsigned int)got)) + return (unsigned int) fptr; + ++ /* We need to load the relocation offset before the function address. */ ++ reloc_offset = plabel[1]; ++ __sync_synchronize(); + got = (unsigned int *) (plabel[0] + GOT_FROM_PLT_STUB); + + /* Return the address of the function if the plabel has been resolved. */ +@@ -137,7 +141,7 @@ + + /* Call fixup to resolve the function address. got[1] contains the + link_map pointer and plabel[1] the relocation offset. */ +- fixup ((struct link_map *) got[1], plabel[1]); ++ fixup ((struct link_map *) got[1], reloc_offset); + + return plabel[0]; + } +Index: gcc/tree-vrp.c +=================================================================== +--- a/src/gcc/tree-vrp.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/tree-vrp.c (.../branches/gcc-8-branch) +@@ -1618,10 +1618,13 @@ + max_ovf = 1; + } + +- /* If we have overflow for the constant part and the resulting +- range will be symbolic, drop to VR_VARYING. */ +- if ((min_ovf && sym_min_op0 != sym_min_op1) +- || (max_ovf && sym_max_op0 != sym_max_op1)) ++ /* If the resulting range will be symbolic, we need to eliminate any ++ explicit or implicit overflow introduced in the above computation ++ because compare_values could make an incorrect use of it. That's ++ why we require one of the ranges to be a singleton. */ ++ if ((sym_min_op0 != sym_min_op1 || sym_max_op0 != sym_max_op1) ++ && (min_ovf || max_ovf ++ || (min_op0 != max_op0 && min_op1 != max_op1))) + { + set_value_range_to_varying (vr); + return; +Index: gcc/attribs.c +=================================================================== +--- a/src/gcc/attribs.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/attribs.c (.../branches/gcc-8-branch) +@@ -1685,8 +1685,11 @@ + a function global scope, unless declared static. */ + if (current_function_decl != NULL_TREE && !TREE_STATIC (node)) + TREE_PUBLIC (node) = 1; +- /* Clear TREE_STATIC because DECL_EXTERNAL is set. */ +- TREE_STATIC (node) = 0; ++ /* Clear TREE_STATIC because DECL_EXTERNAL is set, unless ++ it is a C++ static data member. */ ++ if (DECL_CONTEXT (node) == NULL_TREE ++ || !RECORD_OR_UNION_TYPE_P (DECL_CONTEXT (node))) ++ TREE_STATIC (node) = 0; + } + + if (*no_add_attrs == false) +Index: gcc/opts-common.c +=================================================================== +--- a/src/gcc/opts-common.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/opts-common.c (.../branches/gcc-8-branch) +@@ -463,7 +463,8 @@ + + extra_args = 0; + +- opt_index = find_opt (argv[0] + 1, lang_mask); ++ const char *opt_value = argv[0] + 1; ++ opt_index = find_opt (opt_value, lang_mask); + i = 0; + while (opt_index == OPT_SPECIAL_unknown + && i < ARRAY_SIZE (option_map)) @@ -666,7 +667,24 @@ /* Check if this is a switch for a different front end. */ if (!option_ok_for_language (option, lang_mask)) @@ -6008,7 +8130,17 @@ =================================================================== --- a/src/gcc/c/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/c/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,58 @@ +@@ -1,3 +1,68 @@ ++2019-11-21 Jakub Jelinek ++ ++ Backported from mainline ++ 2019-08-09 Jakub Jelinek ++ ++ PR c/91401 ++ * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the ++ check_no_duplicate_clause call. Comment it out, instead emit a ++ warning for duplicate dist_schedule clauses. ++ +2019-09-03 Iain Sandoe + + Backport from mainline. @@ -6221,7 +8353,19 @@ c_parser_maybe_reclassify_token (parser); token_indent_info next_tinfo -@@ -18461,6 +18478,8 @@ +@@ -13832,7 +13849,10 @@ + c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, + "expected %<,%> or %<)%>"); + +- check_no_duplicate_clause (list, OMP_CLAUSE_SCHEDULE, "schedule"); ++ /* check_no_duplicate_clause (list, OMP_CLAUSE_DIST_SCHEDULE, ++ "dist_schedule"); */ ++ if (omp_find_clause (list, OMP_CLAUSE_DIST_SCHEDULE)) ++ warning_at (loc, 0, "too many %qs clauses", "dist_schedule"); + if (t == error_mark_node) + return list; + +@@ -18461,6 +18481,8 @@ if (c_parser_peek_token (&tparser)->pragma_kind == PRAGMA_GCC_PCH_PREPROCESS) c_parser_pragma_pch_preprocess (&tparser); @@ -6522,13 +8666,43 @@ } /* Copies copy of LOOP as subloop of TARGET loop, placing newly +Index: gcc/optabs.c +=================================================================== +--- a/src/gcc/optabs.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/optabs.c (.../branches/gcc-8-branch) +@@ -5778,6 +5778,25 @@ + icode = get_vcond_icode (mode, cmp_op_mode, unsignedp); + if (icode == CODE_FOR_nothing) + { ++ if (tcode == LT_EXPR ++ && op0a == op0 ++ && TREE_CODE (op0) == VECTOR_CST) ++ { ++ /* A VEC_COND_EXPR condition could be folded from EQ_EXPR/NE_EXPR ++ into a constant when only get_vcond_eq_icode is supported. ++ Verify < 0 and != 0 behave the same and change it to NE_EXPR. */ ++ unsigned HOST_WIDE_INT nelts; ++ if (!VECTOR_CST_NELTS (op0).is_constant (&nelts)) ++ { ++ if (VECTOR_CST_STEPPED_P (op0)) ++ return 0; ++ nelts = vector_cst_encoded_nelts (op0); ++ } ++ for (unsigned int i = 0; i < nelts; ++i) ++ if (tree_int_cst_sgn (vector_cst_elt (op0, i)) == 1) ++ return 0; ++ tcode = NE_EXPR; ++ } + if (tcode == EQ_EXPR || tcode == NE_EXPR) + icode = get_vcond_eq_icode (mode, cmp_op_mode); + if (icode == CODE_FOR_nothing) Index: gcc/DATESTAMP =================================================================== --- a/src/gcc/DATESTAMP (.../tags/gcc_8_3_0_release) +++ b/src/gcc/DATESTAMP (.../branches/gcc-8-branch) @@ -1 +1 @@ -20190222 -+20191008 ++20191201 Index: gcc/tree-ssa-loop-ch.c =================================================================== --- a/src/gcc/tree-ssa-loop-ch.c (.../tags/gcc_8_3_0_release) @@ -6760,7 +8934,33 @@ =================================================================== --- a/src/gcc/configure (.../tags/gcc_8_3_0_release) +++ b/src/gcc/configure (.../branches/gcc-8-branch) -@@ -22799,17 +22799,13 @@ +@@ -666,6 +666,7 @@ + all_selected_languages + all_languages + all_lang_makefrags ++all_lang_configurefrags + all_gtfiles + all_compilers + srcdir +@@ -18448,7 +18449,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 18451 "configure" ++#line 18452 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -18554,7 +18555,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 18557 "configure" ++#line 18558 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -22799,17 +22800,13 @@ # # ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1701:onnv-ab196087-6931056-03/25/10 # @@ -6780,6 +8980,88 @@ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` fi +@@ -29516,7 +29513,8 @@ + all_languages= + all_compilers= + all_outputs='Makefile' +-# List of language makefile fragments. ++# List of language configure and makefile fragments. ++all_lang_configurefrags= + all_lang_makefrags= + # Additional files for gengtype + all_gtfiles="$target_gtfiles" +@@ -29602,6 +29600,7 @@ + esac + $ok || continue + ++ all_lang_configurefrags="$all_lang_configurefrags \$(srcdir)/$gcc_subdir/config-lang.in" + all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" + if test -f $srcdir/$gcc_subdir/lang.opt; then + lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" +@@ -29752,6 +29751,7 @@ + + + ++ + + + +Index: gcc/internal-fn.c +=================================================================== +--- a/src/gcc/internal-fn.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/internal-fn.c (.../branches/gcc-8-branch) +@@ -1385,7 +1385,7 @@ + /* s1 * s2 -> ur */ + if (!uns0_p && !uns1_p && unsr_p) + { +- rtx tem, tem2; ++ rtx tem; + switch (pos_neg0 | pos_neg1) + { + case 1: /* Both operands known to be non-negative. */ +@@ -1415,10 +1415,8 @@ + ops.op2 = NULL_TREE; + ops.location = loc; + res = expand_expr_real_2 (&ops, NULL_RTX, mode, EXPAND_NORMAL); +- tem = expand_binop (mode, and_optab, op0, op1, NULL_RTX, false, +- OPTAB_LIB_WIDEN); +- do_compare_rtx_and_jump (tem, const0_rtx, EQ, true, mode, +- NULL_RTX, NULL, done_label, ++ do_compare_rtx_and_jump (pos_neg0 == 1 ? op0 : op1, const0_rtx, EQ, ++ true, mode, NULL_RTX, NULL, done_label, + profile_probability::very_likely ()); + goto do_error_label; + } +@@ -1449,16 +1447,23 @@ + arg1 = error_mark_node; + emit_jump (do_main_label); + emit_label (after_negate_label); +- tem2 = expand_binop (mode, xor_optab, op0, op1, NULL_RTX, false, +- OPTAB_LIB_WIDEN); +- do_compare_rtx_and_jump (tem2, const0_rtx, GE, false, mode, NULL_RTX, +- NULL, do_main_label, profile_probability::very_likely ()); ++ tem = expand_binop (mode, xor_optab, op0, op1, NULL_RTX, false, ++ OPTAB_LIB_WIDEN); ++ do_compare_rtx_and_jump (tem, const0_rtx, GE, false, mode, NULL_RTX, ++ NULL, do_main_label, ++ profile_probability::very_likely ()); + /* One argument is negative here, the other positive. This + overflows always, unless one of the arguments is 0. But + if e.g. s2 is 0, (U) s1 * 0 doesn't overflow, whatever s1 + is, thus we can keep do_main code oring in overflow as is. */ +- do_compare_rtx_and_jump (tem, const0_rtx, EQ, true, mode, NULL_RTX, +- NULL, do_main_label, profile_probability::very_likely ()); ++ if (pos_neg0 != 2) ++ do_compare_rtx_and_jump (op0, const0_rtx, EQ, true, mode, NULL_RTX, ++ NULL, do_main_label, ++ profile_probability::very_unlikely ()); ++ if (pos_neg1 != 2) ++ do_compare_rtx_and_jump (op1, const0_rtx, EQ, true, mode, NULL_RTX, ++ NULL, do_main_label, ++ profile_probability::very_unlikely ()); + expand_arith_set_overflow (lhs, target); + emit_label (do_main_label); + goto do_main; Index: gcc/builtins.c =================================================================== --- a/src/gcc/builtins.c (.../tags/gcc_8_3_0_release) @@ -7665,7 +9947,658 @@ =================================================================== --- a/src/gcc/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,1834 @@ +@@ -1,3 +1,2485 @@ ++2019-11-29 David Malcolm ++ ++ PR driver/89014 ++ * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Fix ++ use-after-free of the result of ++ aarch64_get_extension_string_for_isa_flags. ++ ++2019-11-21 Jakub Jelinek ++ ++ PR tree-optimization/91355 ++ * tree-ssa-sink.c (select_best_block): Use >= rather than > ++ for early_bb scaled count with best_bb count comparison. ++ ++ Backported from mainline ++ 2019-11-20 Jakub Jelinek ++ ++ PR middle-end/90840 ++ * expmed.c (store_bit_field_1): Handle the case where op0 is not a MEM ++ and has a mode that doesn't have corresponding integral type. ++ ++ PR target/90867 ++ * config/i386/i386.c (ix86_valid_target_attribute_tree): Don't ++ clear opts->x_ix86_isa_flags{,2} here... ++ (ix86_valid_target_attribute_inner_p): ... but here when seeing ++ arch=. Also clear opts->x_ix86_isa_flags{,2}_explicit. ++ ++ PR c/90898 ++ * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Remove ++ assertion. ++ (insert_clobbers_for_var): Fix a typo in function comment. ++ ++ 2019-11-19 Jakub Jelinek ++ ++ PR middle-end/91450 ++ * internal-fn.c (expand_mul_overflow): For s1 * s2 -> ur, if one ++ operand is negative and one non-negative, compare the non-negative ++ one against 0 rather than comparing s1 & s2 against 0. Otherwise, ++ don't compare (s1 & s2) == 0, but compare separately both s1 == 0 ++ and s2 == 0, unless one of them is known to be negative. Remove ++ tem2 variable, use tem where tem2 has been used before. ++ ++ 2019-11-08 Jakub Jelinek ++ ++ PR c++/92384 ++ * function.c (assign_parm_setup_block, assign_parm_setup_stack): Don't ++ copy TYPE_EMPTY_P arguments from data->entry_parm to data->stack_parm ++ slot. ++ (assign_parms): For TREE_ADDRESSABLE parms with TYPE_EMPTY_P type ++ force creation of a unique data.stack_parm slot. ++ ++ 2019-10-17 Jakub Jelinek ++ ++ PR tree-optimization/92056 ++ * tree-object-size.c (cond_expr_object_size): Return early if then_ ++ processing resulted in unknown size. ++ ++ 2019-09-07 Jakub Jelinek ++ ++ PR tree-optimization/91665 ++ * tree-vect-loop.c (vectorizable_reduction): Punt if base has type ++ incompatible with the type of PHI result. ++ ++ 2019-09-06 Jakub Jelinek ++ ++ * function.c (assign_parm_find_data_types): Use RECORD_OR_UNION_TYPE_P ++ before testing TYPE_TRANSPARENT_AGGR. ++ * calls.c (initialize_argument_information, load_register_parameters): ++ Likewise. ++ ++ 2019-09-05 Jakub Jelinek ++ ++ PR middle-end/91001 ++ PR middle-end/91105 ++ PR middle-end/91106 ++ * calls.c (load_register_parameters): For TYPE_TRANSPARENT_AGGR ++ types, use type of their first field instead of type of ++ args[i].tree_value. ++ ++ 2019-09-01 Jakub Jelinek ++ ++ PR middle-end/91623 ++ * optabs.c (expand_vec_cond_expr): If op0 is a VECTOR_CST and only ++ EQ_EXPR/NE_EXPR is supported, verify that op0 only contains ++ zeros or negative elements and use NE_EXPR instead of LT_EXPR against ++ zero vector. ++ ++2019-11-20 Peter Bergner ++ ++ Backport from mainline ++ 2019-11-07 Peter Bergner ++ ++ PR other/92090 ++ * config/rs6000/predicates.md (input_operand): Allow MODE_PARTIAL_INT ++ modes for integer constants. ++ ++2019-11-19 Eric Botcazou ++ ++ * doc/invoke.texi (-gno-internal-reset-location-views): Fix typo. ++ ++2019-11-14 Martin Liska ++ ++ Backport from mainline ++ 2019-11-14 Martin Liska ++ ++ PR target/92389 ++ * config/i386/i386.h: Add PTA_AVX512VPOPCNTDQ to ++ PTA_ICELAKE_CLIENT which is later interited by ++ PTA_ICELAKE_SERVER and PTA_TIGERLAKE. ++ ++2019-11-13 Dragan Mladjenovic ++ ++ Backport from mainline ++ * config/mips/mips.md (rotr3): Sanitize the constant argument ++ instead of asserting its value. ++ ++2019-11-11 H.J. Lu ++ ++ Backport from trunk: ++ PR target/87833 ++ * config/i386/intelmic-mkoffload.c (prepare_target_image): Put ++ -fPIC and -shared the last to create offload image. ++ ++2019-11-11 Thomas Schwinge ++ ++ Backport from trunk: ++ * gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead ++ of 'offset'. ++ ++ Backport from trunk: ++ * Makefile.in (LANG_CONFIGUREFRAGS): Define. ++ (config.status): Use/depend on it. ++ * configure.ac (all_lang_configurefrags): Track, 'AC_SUBST'. ++ * configure: Regenerate. ++ ++2019-11-09 John David Anglin ++ ++ Backport from mainline ++ 2019-11-07 John David Anglin ++ ++ * config/pa/pa.md (memory_barrier): Revise to use ldcw barriers. ++ Enhance comment. ++ (memory_barrier_coherent, memory_barrier_64, memory_barrier_32): New ++ insn patterns using ldcw instruction. ++ (memory_barrier): Remove insn pattern using sync instruction. ++ * config/pa/pa.opt (coherent-ldcw): New option. ++ (ordered): New option. ++ ++2019-11-08 Eric Botcazou ++ ++ PR target/92095 ++ * config/sparc/sparc-protos.h (output_load_pcrel_sym): Declare. ++ * config/sparc/sparc.c (sparc_cannot_force_const_mem): Revert latest ++ change. ++ (got_helper_needed): New static variable. ++ (output_load_pcrel_sym): New function. ++ (get_pc_thunk_name): Remove after inlining... ++ (load_got_register): ...here. Rework the initialization of the GOT ++ register and of the GOT helper. ++ (save_local_or_in_reg_p): Test the REGNO of the GOT register. ++ (sparc_file_end): Test got_helper_needed to decide whether the GOT ++ helper must be emitted. Use output_asm_insn instead of fprintf. ++ (sparc_init_pic_reg): In PIC mode, always initialize the PIC register ++ if optimization is enabled. ++ * config/sparc/sparc.md (load_pcrel_sym): Emit the assembly ++ by calling output_load_pcrel_sym. ++ ++2019-11-06 John David Anglin ++ ++ Backport from mainline ++ 2018-09-19 John David Anglin ++ ++ PR rtl-optimization/85458 ++ * config/pa/pa.c (pa_adjust_priority): Delete. ++ (TARGET_SCHED_ADJUST_PRIORITY): Delete define. ++ ++2019-11-05 Segher Boessenkool ++ ++ Backport from trunk ++ 2019-10-24 Segher Boessenkool ++ ++ * config/rs6000/altivec.md (altivec_vavgu): Rename to... ++ (uavg3_ceil): ... This. ++ (altivec_vavgs): Rename to... ++ (avg3_ceil): ... This. ++ * config/rs6000/rs6000-builtin.def (VAVGUB, VAVGSB, VAVGUH, VAVGSH, ++ VAVGUW, VAVGSW): Adjust. ++ ++2019-11-05 Segher Boessenkool ++ ++ Backport from trunk ++ 2019-10-26 Segher Boessenkool ++ ++ PR target/91289 ++ * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't add an ++ immediate to r0; use r11 instead. Save and restore r11 to r0 around ++ this. ++ ++2019-11-04 John David Anglin ++ ++ Backport from mainline ++ 2019-10-03 John David Anglin ++ ++ * config/pa/pa.h (MAX_PCREL17F_OFFSET): Adjust. ++ ++2019-11-04 John David Anglin ++ ++ Backport from mainline ++ 2019-10-03 John David Anglin ++ ++ * config/pa/pa.c (pa_output_call): Remove 64-bit sibcall sequence. ++ (pa_attr_length_call): Adjust length for 64-bit plabel sequence. ++ ++2019-11-04 John David Anglin ++ ++ Backport from mainline ++ 2019-10-12 John David Anglin ++ ++ * config/pa/pa.c (pa_output_call): Load descriptor address to register ++ %r22. Load function address before global pointer. ++ (pa_attr_length_indirect_call): Adjust length of inline versions of ++ $$dyncall. ++ (pa_output_indirect_call): Remove fast inline version of $$dyncall ++ before normal cases. Update inline $$dyncall sequences to preserve ++ function descriptor address in register %r22. ++ (TRAMPOLINE_CODE_SIZE): Adjust. ++ (pa_asm_trampoline_template): Revise 32-bit trampoline. Don't assume ++ register %r22 contains trampoline address. ++ (pa_trampoline_init): Adjust offsets. ++ (pa_trampoline_adjust_address): Likewise. ++ * config/pa/pa.h (TRAMPOLINE_SIZE): Adjust 32-bit size. ++ ++ 2019-10-17 John David Anglin ++ ++ * config/pa/pa.c (pa_output_indirect_call): Fix typos in last change. ++ ++2019-11-1 Delia Burduv ++ ++ Backport from trunk ++ 2019-02-20 Andre Vieira ++ ++ PR target/86487 ++ * lra-constraints.c(uses_hard_regs_p): Fix handling of ++ paradoxical SUBREGS. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-13 Iain Sandoe ++ ++ * config/darwin.c (machopic_indirection_name): Rework the ++ function to emit linker-visible symbols only for indirections ++ in the data section. Clean up the code and update comments. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-09 Iain Sandoe ++ ++ * config/darwin.c (darwin_override_options): Make the check for ++ Objective-C ABI version more specific for 64bit code. ++ ++ Backport from mainline ++ 2019-10-06 Iain Sandoe ++ ++ * config/darwin.c (darwin_override_options): Adjust objective-c ++ ABI version error messages to avoid punctuation and contracted ++ negations. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-07-03 Iain Sandoe ++ ++ * config/darwin.h (REAL_LIBGCC_SPEC): Adjust for earlier Darwin. ++ (STARTFILE_SPEC): Split crt3 into a separate spec. ++ (DARWIN_EXTRA_SPECS): Add crt2 and crt3 spec. ++ (DARWIN_CRT2_SPEC): New. ++ (DARWIN_CRT3_SPEC): New. ++ (MIN_LD64_OMIT_STUBS): Revise to 62.1. ++ * config/rs6000/darwin.h (DARWIN_CRT2_SPEC): Revise conditions. ++ (DARWIN_CRT3_SPEC): New. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-06-27 Iain Sandoe ++ ++ * config/rs6000/darwin.h (ENDFILE_SPEC): Correct whitespace in the ++ spec. ++ ++ Backport from mainline ++ 2019-06-25 Iain Sandoe ++ ++ * config/rs6000/darwin.h (ENDFILE_SPEC): New. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-06-18 Iain Sandoe ++ ++ * config/darwin.c (darwin_emit_unwind_label): New default to false. ++ (darwin_override_options): Set darwin_emit_unwind_label as needed. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-08-13 Iain Sandoe ++ ++ * config/darwin.c (machopic_indirect_call_target): Rename symbol stub ++ flag. ++ (darwin_override_options): Likewise. ++ * config/darwin.h: Likewise. ++ * config/darwin.opt: Likewise. ++ * config/i386/i386.c (output_pic_addr_const): Likewise. ++ * config/rs6000/darwin.h: Likewise. ++ * config/rs6000/rs6000.c (rs6000_call_darwin_1): Likewise. ++ * config/i386/darwin.h (TARGET_MACHO_PICSYM_STUBS): Rename to ... ++ ... this TARGET_MACHO_SYMBOL_STUBS. ++ (FUNCTION_PROFILER):Likewise. ++ * config/i386/i386.h: Likewise. ++ ++ Backport from mainline ++ 2019-06-16 Iain Sandoe ++ ++ * config/darwin.c (machopic_indirect_call_target): Use renamed ++ darwin_picsymbol_stubs to decide on output. ++ (darwin_override_options): Handle darwin_picsymbol_stubs. ++ * config/darwin.h (MIN_LD64_OMIT_STUBS): New. ++ (LD64_VERSION): Revise default. ++ * config/darwin.opt: (mpic-symbol-stubs): New option. ++ (darwin_picsymbol_stubs): New variable. ++ * config/i386/darwin.h (TARGET_MACHO_BRANCH_ISLANDS): ++ rename to TARGET_MACHO_PICSYM_STUBS. ++ * config/i386/i386.c (output_pic_addr_const): Likewise. ++ * config/i386/i386.h Likewise. ++ * config/rs6000/darwin.h: Likewise. ++ * config/rs6000/rs6000.c (rs6000_call_darwin_1): Use renamed ++ darwin_picsymbol_stubs. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-06-27 Iain Sandoe ++ ++ * config/rs6000/rs6000.c (darwin_rs6000_override_options): Honour ++ user-specified float mode choice for kernel mode code. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline ++ 2019-06-23 Iain Sandoe ++ ++ * config/rs6000/darwin.h: Handle GCC target pragma. ++ ++2019-10-30 Dragan Mladjenovic ++ ++ Backport from mainline ++ 2019-07-09 Dragan Mladjenovic ++ ++ * cfgcleanup.c (old_insns_match_p): Check if used hard regs set is equal ++ for both call instructions. ++ ++2019-10-28 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-17 Iain Sandoe ++ ++ PR target/65342 ++ * config/rs6000/darwin.md (movdi_low, movsi_low_st): Delete. ++ (movdi_low_st): Delete. ++ * config/rs6000/rs6000.c ++ (darwin_rs6000_legitimate_lo_sum_const_p): New. ++ (mem_operand_gpr): Validate Mach-O LO_SUM cases separately. ++ * config/rs6000/rs6000.md (movsi_low): Delete. ++ ++2019-10-28 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-12 Iain Sandoe ++ ++ PR target/67183 ++ * config/darwin.c (machopic_indirection): New field to flag ++ non-lazy-symbol-pointers in the data section. ++ (machopic_indirection_name): Compute if an indirection should ++ appear in the data section. ++ (machopic_output_data_section_indirection): New callback split ++ from machopic_output_indirection. ++ (machopic_output_stub_indirection): Likewise. ++ (machopic_output_indirection): Retain the code for non-lazy ++ symbol pointers in their regular section. ++ (machopic_finish): Use the new callbacks to order the indirection ++ output. ++ ++2019-10-28 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-12 Iain Sandoe ++ ++ * config/darwin-protos.h (machopic_finish): Delete. ++ * config/darwin.c (machopic_finish): Make static. ++ ++ Backport from mainline ++ 2019-10-09 Iain Sandoe ++ ++ * config/darwin.c (machopic_indirect_data_reference): Set flag to ++ indicate that the new symbol is an indirection. ++ (machopic_indirect_call_target): Likewise. ++ * config/darwin.h (MACHO_SYMBOL_FLAG_INDIRECTION): New. ++ (MACHO_SYMBOL_INDIRECTION_P): New. ++ (MACHO_SYMBOL_FLAG_STATIC): Adjust bit number. ++ ++ Backport from mainline ++ 2019-10-08 Iain Sandoe ++ ++ * config/darwin.c (machopic_indirect_data_reference): Check for ++ required indirections before making direct access to defined ++ values. ++ (machopic_output_indirection): Place the indirected pointes for ++ required indirections into the non-lazy symbol pointers section. ++ (darwin_encode_section_info): ++ * config/darwin.h (MACHO_SYMBOL_FLAG_MUST_INDIRECT): New. ++ (MACHO_SYMBOL_MUST_INDIRECT_P): New. ++ ++ Backport from mainline ++ 2019-10-07 Iain Sandoe ++ ++ * config/darwin.c (machopic_output_indirection): Don't put ++ hidden symbol indirections into the .data section, use the ++ non-lazy symbol pointers section as normal. ++ (darwin_encode_section_info): Record if a symbol is hidden. ++ * config/darwin.h (MACHO_SYMBOL_FLAG_HIDDEN_VIS): New. ++ (MACHO_SYMBOL_HIDDEN_VIS_P): New. ++ ++ Backport from mainline ++ 2019-10-07 Iain Sandoe ++ ++ * config/darwin.c (machopic_symbol_defined_p): Use symbol flag ++ predicates instead of accessing bits directly. ++ (machopic_indirect_call_target): Likewise. ++ (machopic_output_indirection): Likewise. ++ (darwin_encode_section_info): Improve description. Use renamed ++ symbol flags. Use predicate macros for variables and functions. ++ * config/darwin.h: ++ Rename MACHO_SYMBOL_VARIABLE to MACHO_SYMBOL_FLAG_VARIABLE. ++ Rename MACHO_SYMBOL_DEFINED to MACHO_SYMBOL_FLAG_DEFINED. ++ Rename MACHO_SYMBOL_STATIC to MACHO_SYMBOL_FLAG_STATIC. ++ (MACHO_SYMBOL_VARIABLE_P): New. ++ (MACHO_SYMBOL_DEFINED_P):New. ++ (MACHO_SYMBOL_STATIC_P): New. ++ * config/i386/darwin.h (MACHO_SYMBOL_FLAG_VARIABLE): Delete. ++ (SYMBOL_FLAG_SUBT_DEP): New. ++ * config/rs6000/darwin.h (SYMBOL_FLAG_SUBT_DEP): New. ++ ++2019-10-28 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-05 Iain Sandoe ++ ++ PR target/59888 ++ * config/darwin.c (darwin_rodata_section): Add relocation flag, ++ choose const_data section for constants with relocations. ++ (machopic_select_section): Pass relocation flag to ++ darwin_rodata_section (). ++ ++2019-10-28 Iain Sandoe ++ ++ Backport from mainline ++ 2019-09-21 Iain Sandoe ++ ++ * config/darwin.c (machopic_legitimize_pic_address): Check ++ for lra, rather than reload. ++ ++2019-10-28 Peter Bergner ++ Jiufu Guo ++ ++ PR target/70010 ++ * config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if ++ the callee explicitly disables some isa_flags the caller is using. ++ ++2019-10-25 Iain Sandoe ++ ++ * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN):Guard ++ against out of range max skip or log values. ++ ++2019-10-25 Richard Earnshaw ++ ++ Backport from mainline ++ 2019-05-08 Mihail Ionescu ++ Richard Earnshaw ++ PR target/88167 ++ * config/arm/arm.c (thumb1_prologue_unused_call_clobbered_lo_regs): New ++ function. ++ (thumb1_epilogue_unused_call_clobbered_lo_regs): New function. ++ (thumb1_compute_save_core_reg_mask): Don't force a spare work ++ register if both the epilogue and prologue can use call-clobbered ++ regs. ++ (thumb1_unexpanded_epilogue): Use ++ thumb1_epilogue_unused_call_clobbered_lo_regs. Reverse the logic for ++ picking temporaries for restoring high regs to match that of the ++ prologue where possible. ++ (thumb1_expand_prologue): Add any usable call-clobbered low registers to ++ the list of work registers. Detect if the return address is still live ++ at the end of the prologue and avoid using it for a work register if so. ++ If the return address is not live, add LR to the list of pushable regs ++ after the first pass. ++ ++2019-10-23 Peter Bergner ++ ++ Backport from mainline ++ 2019-10-08 Tulio Magno Quites Machado Filho ++ ++ * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and ++ LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and ++ MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. ++ ++2019-10-23 Richard Biener ++ ++ Backport from mainline ++ 2019-10-17 Richard Biener ++ ++ PR debug/91887 ++ * dwarf2out.c (gen_formal_parameter_die): Also try to match ++ context_die against a DW_TAG_GNU_formal_parameter_pack parent. ++ ++ 2019-09-19 Richard Biener ++ ++ PR tree-optimization/91812 ++ * tree-ssa-phiprop.c (propagate_with_phi): Do not replace ++ volatile loads. ++ ++ 2019-09-17 Richard Biener ++ ++ PR debug/91772 ++ * dwarf2out.c (dwarf2out_late_global_decl): If early dwarf ++ was missing generate locations only once. ++ ++2019-10-23 Eric Botcazou ++ ++ PR tree-optimization/92131 ++ * tree-vrp.c (extract_range_from_plus_minus_expr): If the resulting ++ range would be symbolic, drop to varying for any explicit overflow ++ in the constant part or if neither range is a singleton. ++ ++2019-10-20 Iain Sandoe ++ ++ Backport from mainline ++ 2019-10-03 Iain Sandoe ++ ++ PR target/87243 ++ * config/darwin-driver.c (maybe_get_sysroot_from_sdkroot): New. ++ (darwin_driver_init): Use the sysroot provided by SDKROOT when that ++ is available and the user has not set one on the command line. ++ ++2019-10-20 Iain Sandoe ++ ++ Backport from mainline ++ 2019-07-03 Iain Sandoe ++ ++ * config/darwin.h (DRIVER_SELF_SPECS): Remove the linker cases. ++ (RDYNAMIC): Rename to, DARWIN_RDYNAMIC. ++ (DARWIN_PIE_SPEC, DARWIN_NOPIE_SPEC): Adjust to remove the Xlinker ++ clauses. ++ (LINK_COMMAND_SPEC_A): Add DARWIN_RDYNAMIC, DARWIN_PIE_SPEC and ++ DARWIN_NOPIE_SPEC. ++ ++ Backport from mainline ++ 2019-06-19 Iain Sandoe ++ ++ * config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC ++ and DARWIN_NOPIE_SPEC. ++ (RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC. ++ (DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h. ++ (DARWIN_NOPIE_SPEC): Collate from darwin10.h. ++ (DARWIN_NOCOMPACT_UNWIND): New from darwin10.h ++ (DARWIN_EXPORT_DYNAMIC): Delete. ++ * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind ++ and pie options processing to darwin.h. ++ * config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h ++ ++2019-10-18 Georg-Johann Lay ++ ++ Backport from 2019-10-18 trunk r277143. ++ ++ PR target/86040 ++ * config/avr/avr.c (avr_out_lpm): Do not shortcut-return. ++ ++2019-10-17 Segher Boessenkool ++ ++ Backport from trunk ++ 2019-03-15 Segher Boessenkool ++ ++ PR rtl-optimization/89721 ++ * lra-constraints (invariant_p): Return false if side_effects_p holds. ++ ++2019-10-17 Richard Earnshaw ++ ++ Backport from mainline ++ 2019-05-03 Richard Earnshaw ++ ++ PR target/89400 ++ * config/arm/arm.md (unaligned_loadsi): Add variant for thumb1. ++ Restrict 'all' variant to 32-bit configurations. ++ (unaligned_loadhiu): Likewise. ++ (unaligned_storehi): Likewise. ++ (unaligned_storesi): Likewise. ++ (unaligned_loadhis): Disable when compiling for thumb1. ++ ++2019-10-14 Will Schmidt ++ ++ Backport from trunk ++ 2019-09-26 Will Schmidt ++ ++ * config/rs6000/rs6000-builtin.def: (LVSL, LVSR, LVEBX, LVEHX, ++ LVEWX, LVXL, LVXL_V2DF, LVXL_V2DI, LVXL_V4SF, LVXL_V4SI, LVXL_V8HI, ++ LVXL_V16QI, LVX, LVX_V1TI, LVX_V2DF, LVX_V2DI, LVX_V4SF, LVX_V4SI, ++ LVX_V8HI, LVX_V16QI, LVLX, LVLXL, LVRX, LVRXL, LXSDX, LXVD2X_V1TI, ++ LXVD2X_V2DF, LXVD2X_V2DI, LXVDSX, LXVW4X_V4SF, LXVW4X_V4SI, ++ LXVW4X_V8HI, LXVW4X_V16QI, LD_ELEMREV_V1TI, LD_ELEMREV_V2DF, ++ LD_ELEMREV_V2DI, LD_ELEMREV_V4SF, LD_ELEMREV_V4SI, LD_ELEMREV_V8HI, ++ LD_ELEMREV_V16QI): Use the PURE attribute. ++ ++2019-10-10 UroĆĄ Bizjak ++ ++ PR target/92022 ++ * config/alpha/alpha.c (alpha_handle_trap_shadows): Skip DEBUG_INSN. ++ ++2019-10-10 Oleg Endo ++ ++ Backport from mainline ++ 2019-10-10 Oleg Endo ++ ++ PR target/88630 ++ * config/sh/sh.h (TARGET_FPU_SH4_300): New macro. ++ * config/sh/sh.c (sh_option_override): Enable fsca and fsrra insns ++ also for TARGET_FPU_SH4_300. ++ (sh_emit_mode_set): Check for TARGET_FPU_SH4_300 instead of ++ TARGET_SH4_300. ++ * config/sh/sh.md (toggle_pr): Add TARGET_FPU_SH4_300 condition. ++ (negsf2): Expand to either negsf2_fpscr or negsf2_no_fpscr. ++ (*negsf2_i): Split into ... ++ (negsf2_fpscr, negsf2_no_fpscr): ... these new patterns. ++ (abssf2): Expand to either abssf2_fpsc or abssf2_no_fpsc. ++ (**abssf2_i): Split into ... ++ (abssf2_fpscr, abssf2_no_fpscr): ... these new patterns. ++ (negdf2): Expand to either negdf2_fpscr or negdf2_no_fpscr. ++ (*negdf2_i): Split into ... ++ (negdf2_fpscr, negdf2_no_fpscr): ... these new patterns. ++ (absdf2): Expand to either absdf2_fpscr or absdf2_no_fpsc. ++ (**abssf2_i): Split into ... ++ (absdf2_fpscr, absdf2_no_fpscr): ... these new patterns. ++ +2019-10-07 Bill Schmidt + + Backport from mainline @@ -9500,7 +12433,7 @@ 2019-02-22 Release Manager * GCC 8.3.0 released. -@@ -568,7 +2403,7 @@ +@@ -568,7 +3054,7 @@ Backport from mainline 2018-11-20 Richard Biener @@ -10418,6 +13351,58 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pure-builtin-redundant-load.c (.../branches/gcc-8-branch) +@@ -0,0 +1,47 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target powerpc_vsx_ok } */ ++/* { dg-options "-O2 -fdump-tree-fre-all -mvsx" } */ ++ ++/* Verify we remove a redundant load that occurs both before and after ++we call a vector load builtin. ++This testcase is introduced as we updated a number of our vector load ++built-ins with the attribute of PURE instead of MEM, to indicate that ++those builtins only read from memory, versus reading from and writing ++to the same. ++This means we can identify the redundant load instructions in an earlier ++pass, and optimize them away. */ ++ ++#include ++ ++vector signed short load_data; ++ ++vector signed short foo() ++{ ++ vector signed short r11,r12,r13; ++ r11 = load_data; ++ r12 = vec_xl (0, &load_data[0]); ++ r13 = load_data; ++ return (r11 + r12 + r13); ++} ++ ++vector signed short biz() ++{ ++ vector signed short r21,r22,r23; ++ r21 = load_data; ++ r22 = vec_lvehx (0, &load_data[0]); ++ r23 = load_data; ++ return (r21 + r22 + r23); ++} ++ ++vector signed short bar() ++{ ++ vector signed short r31,r32,r33; ++ r31 = load_data; ++ r32 = vec_lvx (0, &load_data[0]); ++ r33 = load_data; ++ return (r31 + r32 + r33); ++} ++ ++/* { dg-final { scan-tree-dump-times "Removing dead stmt r13_. = load_data;" 1 "fre1" } } */ ++/* { dg-final { scan-tree-dump-times "Removing dead stmt r23_. = load_data;" 1 "fre1" } } */ ++/* { dg-final { scan-tree-dump-times "Removing dead stmt r33_. = load_data;" 1 "fre1" } } */ Index: gcc/testsuite/gcc.target/powerpc/builtins-2.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/builtins-2.c (.../tags/gcc_8_3_0_release) @@ -10996,6 +13981,31 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pr70010.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr70010.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr70010.c (.../branches/gcc-8-branch) +@@ -0,0 +1,20 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -finline-functions -Wno-psabi -mvsx" } */ ++/* { dg-final { scan-assembler {\mbl \.?vadd_no_vsx\M} } } */ ++ ++ ++typedef int vec_t __attribute__((vector_size(16))); ++ ++static vec_t ++__attribute__((__target__("no-vsx"))) ++vadd_no_vsx (vec_t a, vec_t b) ++{ ++ return a + b; ++} ++ ++vec_t ++__attribute__((__target__("vsx"))) ++call_vadd_no_vsx (vec_t x, vec_t y, vec_t z) ++{ ++ return vadd_no_vsx (x, y) - z; ++} Index: gcc/testsuite/gcc.target/powerpc/pr71785.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr71785.c (.../tags/gcc_8_3_0_release) @@ -11698,6 +14708,28 @@ + abort (); + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pr70010-4.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr70010-4.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr70010-4.c (.../branches/gcc-8-branch) +@@ -0,0 +1,17 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mvsx" } */ ++ ++vector int c, a, b; ++ ++static inline void __attribute__ ((__always_inline__, target ("no-vsx"))) ++foo () /* { dg-error "inlining failed in call to .* target specific option mismatch" } */ ++{ ++ c = a + b; ++} ++ ++int ++main () ++{ ++ foo (); /* { dg-message "called from here" } */ ++ c = a + b; ++} Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-14c.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14c.c (.../tags/gcc_8_3_0_release) @@ -11981,6 +15013,56 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pr92090-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr92090-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr92090-2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,45 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mcpu=power8 -Os -w" } */ ++/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */ ++ ++/* Verify that we don't ICE. */ ++ ++int a; ++static _Atomic long double b, c, d, m; ++double n; ++extern int foo (void); ++extern void bar (int, int, int, int); ++ ++void ++bug (void) ++{ ++ b = 1.79769313486231580793728971405301199e308L; ++ for (int i = 0; i < 10000; i++) ++ if (__builtin_isinf (n)) ++ b; ++ c = 1; ++ int e, f, g, h; ++ while (a) ++ ; ++ for (int i; i; i++) ++ { ++ double j = c /= foo (); ++ if (__builtin_isinf (j)) ++ { ++ if (foo == 1 << 31) ++ e++; ++ f++; ++ c = 0; ++ } ++ else ++ { ++ if (foo == 1 << 30) ++ g++; ++ h++; ++ c = 1; ++ } ++ } ++ bar (e, f, g, h); ++ d = 1.79769313486231580793728971405301199e308L; ++ m = 1; ++} Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16a.c (.../tags/gcc_8_3_0_release) @@ -13603,7 +16685,7 @@ =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr91275.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/gcc.target/powerpc/pr91275.c (.../branches/gcc-8-branch) -@@ -0,0 +1,21 @@ +@@ -0,0 +1,26 @@ +/* Test that we generate vpmsumd correctly without a swap error. */ + +/* { dg-do run { target { p8vector_hw } } } */ @@ -13616,12 +16698,17 @@ + const unsigned long long r0l = 0x8e7dfceac070e3a0; + vector unsigned long long r0 = (vector unsigned long long) {r0l, 0}, v; + const vector unsigned long long pd -+ = (vector unsigned long) {0xc2LLU << 56, 0}; ++ = (vector unsigned long long) {0xc2LLU << 56, 0}; + + v = __builtin_crypto_vpmsumd ((vector unsigned long long) {r0[0], 0}, pd); + ++#if __LITTLE_ENDIAN__ + if (v[0] != 0x4000000000000000 || v[1] != 0x65bd7ab605a4a8ff) + __builtin_abort (); ++#else ++ if (v[1] != 0x4000000000000000 || v[0] != 0x65bd7ab605a4a8ff) ++ __builtin_abort (); ++#endif + + return 0; +} @@ -15218,6 +18305,29 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pr70010-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr70010-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr70010-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,18 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -flto -mvsx" } */ ++/* { dg-require-effective-target lto } */ ++ ++vector int c, a, b; ++ ++static inline void __attribute__ ((__always_inline__, target ("no-vsx"))) ++foo () /* { dg-error "inlining failed in call to .* target specific option mismatch" } */ ++{ ++ c = a + b; ++} ++ ++int ++main () ++{ ++ foo (); /* { dg-message "called from here" } */ ++ c = a + b; ++} Index: gcc/testsuite/gcc.target/powerpc/pr79909.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr79909.c (.../tags/gcc_8_3_0_release) @@ -15587,6 +18697,28 @@ + abort (); + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/pr70010-3.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr70010-3.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr70010-3.c (.../branches/gcc-8-branch) +@@ -0,0 +1,17 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mno-vsx" } */ ++ ++vector int c, a, b; ++ ++static inline void __attribute__ ((__always_inline__, target ("no-vsx"))) ++foo () ++{ ++ c = a + b; ++} ++ ++int ++main () ++{ ++ foo (); ++ c = a + b; ++} Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-14b.c (.../tags/gcc_8_3_0_release) @@ -15866,6 +18998,24 @@ +#undef DISABLE_INLINE_OF_GET_AUTO_N + +#include "vec-extract-v16qiu-v2.h" +Index: gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp (.../branches/gcc-8-branch) +@@ -16,9 +16,11 @@ + # along with GCC; see the file COPYING3. If not see + # . + +-# Exit immediately if this isn't a PowerPC target or if the target is aix. ++# Exit immediately if this isn't a PowerPC target or if the target is ++# aix or Darwin. + if { (![istarget powerpc*-*-*] && ![istarget rs6000-*-*]) +- || [istarget "powerpc*-*-aix*"] } then { ++ || [istarget "powerpc*-*-aix*"] ++ || [istarget "powerpc*-*-darwin*"] } then { + return + } + Index: gcc/testsuite/gcc.target/powerpc/pr87532.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/pr87532.c (.../tags/gcc_8_3_0_release) @@ -16423,6 +19573,24 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp (.../branches/gcc-8-branch) +@@ -16,8 +16,11 @@ + # along with GCC; see the file COPYING3. If not see + # . + +-# Exit immediately if this isn't a PowerPC target. +-if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then { ++# Exit immediately if this isn't a PowerPC target, also exit if we ++# are on Darwin which doesn't support decimal float. ++if { (![istarget powerpc*-*-*] && ![istarget rs6000-*-*]) ++ || [istarget "powerpc*-*-darwin*"] ++} then { + return + } + Index: gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-v2.h (.../tags/gcc_8_3_0_release) @@ -16851,6 +20019,54 @@ -/* { dg-final { scan-assembler "ori 31,31,0" } } */ +/* { dg-final { scan-assembler {ori\s+r?31,r?31,r?0} } } */ +Index: gcc/testsuite/gcc.target/powerpc/pr92090.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/powerpc/pr92090.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/powerpc/pr92090.c (.../branches/gcc-8-branch) +@@ -0,0 +1,43 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mcpu=power8 -Os" } */ ++/* { dg-additional-options "-mbig" { target powerpc64le-*-* } } */ ++ ++/* Verify that we don't ICE. */ ++ ++_Atomic int a; ++_Atomic long double b, c; ++int j; ++void foo (void); ++void bar (int, int, int, int); ++ ++void ++bug (void) ++{ ++ b = 1; ++ int d, e, f, g; ++ while (a) ++ ; ++ for (int h = 0; h < 10000; h++) ++ { ++ double i = b /= 3; ++ foo (); ++ if (i) ++ { ++ if (i == 1) ++ d++; ++ e++; ++ b = 0; ++ } ++ else ++ { ++ if (i == 2) ++ f++; ++ g++; ++ b = 1; ++ } ++ } ++ bar (d, e, f, g); ++ c = 1; ++ for (int h; h; h++) ++ j = 0; ++} Index: gcc/testsuite/gcc.target/powerpc/vsx-builtin-16d.c =================================================================== --- a/src/gcc/testsuite/gcc.target/powerpc/vsx-builtin-16d.c (.../tags/gcc_8_3_0_release) @@ -17932,6 +21148,64 @@ +{ + return __crc32cw (a, b); +} +Index: gcc/testsuite/gcc.target/arm/pr86487.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/arm/pr86487.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/arm/pr86487.c (.../branches/gcc-8-branch) +@@ -0,0 +1,10 @@ ++/* { dg-skip-if "" { *-*-* } { "-march=armv[0-6]*" "-mthumb" } { "" } } */ ++/* { dg-require-effective-target arm_neon_hw } */ ++/* { dg-options "-O1 -mbig-endian" } */ ++/* { dg-add-options arm_neon } */ ++int a, b, c, d; ++long long fn1(long long p2) { return p2 == 0 ? -1 : -1 % p2; } ++void fn2(long long p1, short p2, long p3) { ++ b = fn1((d || 6) & a); ++ c = b | p3; ++} +Index: gcc/testsuite/gcc.target/arm/pr88167-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/arm/pr88167-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/arm/pr88167-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,15 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target arm_thumb1_ok } */ ++/* { dg-options "-O2 -mthumb" } */ ++ ++void *retaddr; ++ ++void foo (void) { ++ retaddr = __builtin_return_address (0); ++ ++ /* Used for enforcing registers stacking. */ ++ asm volatile ("" : : : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", ++ "r8", "r9", "r10", "r11", "r12"); ++} ++ ++/* { dg-final { scan-assembler-not "mov\tlr," } } */ +Index: gcc/testsuite/gcc.target/arm/pr88167-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/arm/pr88167-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/arm/pr88167-2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,18 @@ ++/* { dg-do run } */ ++/* { dg-options "-O2" } */ ++/* { dg-skip-if "" { ! { arm_thumb1 } } } */ ++ ++int __attribute__((noclone, noinline)) ++foo (int a, long long b) { ++ /* Used for enforcing registers stacking. */ ++ asm volatile ("" : : : "r0", "r1", "r2", "r3", ++ "r8", "r9", "r10", "r11", "r12"); ++ return (int) b; ++} ++ ++int main () ++{ ++ if (foo (1, 0x1000000000000003LL) != 3) ++ __builtin_abort (); ++ __builtin_exit (0); ++} Index: gcc/testsuite/gcc.target/arm/pr89222.c =================================================================== --- a/src/gcc/testsuite/gcc.target/arm/pr89222.c (.../tags/gcc_8_3_0_release) @@ -18310,6 +21584,61 @@ + + return 0; +} +Index: gcc/testsuite/gcc.target/sparc/overflow-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/sparc/overflow-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-1.c (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mcpu=v8" } */ ++/* { dg-options "-O -fno-pie -mcpu=v8" } */ + /* { dg-require-effective-target ilp32 } */ + + #include +Index: gcc/testsuite/gcc.target/sparc/overflow-5.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/sparc/overflow-5.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-5.c (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mvis3" } */ ++/* { dg-options "-O -fno-pie -mvis3" } */ + /* { dg-require-effective-target lp64 } */ + + #include +Index: gcc/testsuite/gcc.target/sparc/overflow-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/sparc/overflow-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-2.c (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mcpu=v8" } */ ++/* { dg-options "-O -fno-pie -mcpu=v8" } */ + /* { dg-require-effective-target ilp32 } */ + + #include +Index: gcc/testsuite/gcc.target/sparc/overflow-3.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/sparc/overflow-3.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-3.c (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O" } */ ++/* { dg-options "-O -fno-pie" } */ + /* { dg-require-effective-target lp64 } */ + + #include +Index: gcc/testsuite/gcc.target/sparc/overflow-4.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/sparc/overflow-4.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/sparc/overflow-4.c (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + /* { dg-do compile } */ +-/* { dg-options "-O -mno-vis3" } */ ++/* { dg-options "-O -fno-pie -mno-vis3" } */ + /* { dg-require-effective-target lp64 } */ + + #include Index: gcc/testsuite/gcc.target/sparc/20161111-1.c =================================================================== --- a/src/gcc/testsuite/gcc.target/sparc/20161111-1.c (.../tags/gcc_8_3_0_release) @@ -18566,6 +21895,58 @@ +} + +/* { dg-final { scan-assembler "cfc1" } } */ +Index: gcc/testsuite/gcc.target/mips/cfgcleanup-jalr1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,19 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips" } */ ++/* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */ ++ ++extern void foo (void*); ++ ++extern void bar (void*); ++ ++void ++test (void* p) ++{ ++ if (!p) ++ foo(p); ++ else ++ bar(p); ++} ++ ++/* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,foo" } } */ ++/* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,bar" } } */ +Index: gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,23 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips" } */ ++/* { dg-additional-options "-fno-inline -fipa-ra -mcompact-branches=never" } */ ++/* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */ ++ ++static int foo (void* p) { __asm__ (""::"r"(p):"$t0"); return 0; } ++ ++static int bar (void* p) { return 1; } ++ ++int ++test (void* p) ++{ ++ int res = !p ? foo(p) : bar(p); ++ ++ register int tmp __asm__("$t0") = -1; ++ __asm__ (""::"r"(tmp)); ++ ++ return res; ++} ++ ++/* { dg-final { scan-assembler "\\\.reloc\t1f,R_MIPS_JALR,foo" } } */ ++/* { dg-final { scan-assembler "\\\.reloc\t1f,R_MIPS_JALR,bar" } } */ ++/* { dg-final { scan-assembler-not "\\.set\tnomacro\n\tjalr\t\\\$25" } } */ Index: gcc/testsuite/gcc.target/mips/dwarfregtable-1.c =================================================================== --- a/src/gcc/testsuite/gcc.target/mips/dwarfregtable-1.c (.../tags/gcc_8_3_0_release) @@ -18603,6 +21984,34 @@ + __builtin_abort (); + return 0; +} +Index: gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/mips/cfgcleanup-jalr3.c (.../branches/gcc-8-branch) +@@ -0,0 +1,23 @@ ++/* { dg-do compile } */ ++/* { dg-options "-mabicalls -fpic -mno-mips16 -mno-micromips" } */ ++/* { dg-additional-options "-fno-inline -fipa-ra -mcompact-branches=never" } */ ++/* { dg-skip-if "needs codesize optimization" { *-*-* } { "-O0" "-O1" "-O2" "-O3" } { "" } } */ ++ ++static int foo (void* p) { return 0; } ++ ++static int bar (void* p) { return 1; } ++ ++int ++test (void* p) ++{ ++ int res = !p ? foo(p) : bar(p); ++ ++ register int tmp __asm__("$t0") = -1; ++ __asm__ (""::"r"(tmp)); ++ ++ return res; ++} ++ ++/* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,foo" } } */ ++/* { dg-final { scan-assembler-not "\\\.reloc\t1f,R_MIPS_JALR,bar" } } */ ++/* { dg-final { scan-assembler "\\.set\tnomacro\n\tjalr\t\\\$25" } } */ Index: gcc/testsuite/gcc.target/mips/dwarfregtable-2.c =================================================================== --- a/src/gcc/testsuite/gcc.target/mips/dwarfregtable-2.c (.../tags/gcc_8_3_0_release) @@ -19030,7 +22439,7 @@ -/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times {jmp[ \t]*\.?LIND} 2 } } */ +/* { dg-final { scan-assembler-times {call[ \t]*\.?LIND} 2 } } */ /* { dg-final { scan-assembler-times {\tpause} 1 } } */ @@ -19080,7 +22489,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -19243,7 +22652,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -19331,7 +22740,7 @@ +/* { dg-final { scan-assembler "_?__x86_return_thunk:" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_bar} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler-times {\tpause} 2 } } */ /* { dg-final { scan-assembler-times {\tlfence} 2 } } */ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ @@ -19435,7 +22844,7 @@ -/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times {jmp[ \t]*\.?LIND} 2 } } */ +/* { dg-final { scan-assembler-times {call[ \t]*\.?LIND} 2 } } */ /* { dg-final { scan-assembler-times {\tpause} 1 } } */ @@ -19461,7 +22870,7 @@ +/* { dg-final { scan-assembler "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %" { target { ia32 && { ! *-*-darwin* } } } } } */ + +/* Darwin m32 defaults to PIC but common symbols need to be indirected. */ -+/* { dg-final { scan-assembler {movl[ \t]l_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t][Ll]_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ + Index: gcc/testsuite/gcc.target/i386/indirect-thunk-2.c =================================================================== @@ -19485,7 +22894,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -19655,7 +23064,7 @@ -/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times {jmp[ \t]*\.?LIND} 2 } } */ +/* { dg-final { scan-assembler-times {call[ \t]*\.?LIND} 2 } } */ /* { dg-final { scan-assembler {\tpause} } } */ @@ -19779,7 +23188,7 @@ + +/* For Darwin, we need PIC to allow PIE, but also we must indirect weak symbols so that + they can be indirected. Again, dyld knows how to deal with this. */ -+/* { dg-final { scan-assembler {movl[ \t]l_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t][Ll]_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ Index: gcc/testsuite/gcc.target/i386/indirect-thunk-3.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c (.../tags/gcc_8_3_0_release) @@ -19802,7 +23211,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -19904,6 +23313,41 @@ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "_?__x86_indirect_thunk_(r|e)ax:" } } */ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */ +Index: gcc/testsuite/gcc.target/i386/pr90867.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr90867.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr90867.c (.../branches/gcc-8-branch) +@@ -0,0 +1,30 @@ ++/* PR target/90867 */ ++/* { dg-do run { target lp64 } } */ ++/* { dg-options "-O2 -msse2" } */ ++ ++unsigned long long freq = 3600000000UL; /* 3.6 GHz = 3600.0 MHz */ ++ ++__attribute__((noipa)) void ++bar (double x) ++{ ++ static double d = 3600000000.0; ++ if (x != d) ++ __builtin_abort (); ++ d /= 1000.0; ++} ++ ++__attribute__ ((target ("arch=x86-64"))) int ++foo () ++{ ++ bar ((double) freq); ++ bar (1e-3 * freq); ++ bar (1e-6 * freq); ++ bar (1e-9 * freq); ++ return 0; ++} ++ ++int ++main () ++{ ++ return foo (); ++} Index: gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c (.../tags/gcc_8_3_0_release) @@ -20008,7 +23452,7 @@ -/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times {jmp[ \t]*\.?LIND} 2 } } */ +/* { dg-final { scan-assembler-times {call[ \t]*\.?LIND} 2 } } */ /* { dg-final { scan-assembler {\tpause} } } */ @@ -20183,7 +23627,7 @@ +/* { dg-final { scan-assembler "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %" { target { ia32 && { ! *-*-darwin* } } } } } */ + +/* Darwin m32 equivalent (indirect and PIC). */ -+/* { dg-final { scan-assembler {movl[ \t]l_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t][Ll]_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ Index: gcc/testsuite/gcc.target/i386/indirect-thunk-4.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c (.../tags/gcc_8_3_0_release) @@ -20206,7 +23650,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -20301,7 +23745,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ -/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */ @@ -20363,7 +23807,7 @@ -/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ -/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */ @@ -20601,7 +24045,7 @@ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_bar} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */ Index: gcc/testsuite/gcc.target/i386/pr90193.c @@ -20672,7 +24116,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ -/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */ @@ -20739,7 +24183,7 @@ -/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ -/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */ @@ -20957,7 +24401,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_bar} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_bar\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */ Index: gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c @@ -21068,7 +24512,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ /* { dg-final { scan-assembler {\tpause} } } */ @@ -21261,7 +24705,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ -/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */ @@ -21322,7 +24766,7 @@ +/* { dg-final { scan-assembler-not "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %eax" { target { ia32 && { ! *-*-darwin* } } } } } */ + +/* Darwin m32 equivalent (indirect and PIC). */ -+/* { dg-final { scan-assembler {movl[ \t]l_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t][Ll]_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ Index: gcc/testsuite/gcc.target/i386/indirect-thunk-7.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c (.../tags/gcc_8_3_0_release) @@ -21538,7 +24982,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ /* { dg-final { scan-assembler {\tpause} } } */ @@ -21640,7 +25084,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */ Index: gcc/testsuite/gcc.target/i386/pr55597.c @@ -21695,7 +25139,7 @@ +/* { dg-final { scan-assembler "movl\[ \t\]xxx@GOT\\(%\[^,\]*\\), %" { target { ia32 && { ! *-*-darwin* } } } } } */ + +/* Darwin m32 default to PIC but needs indirection for the weak symbol. */ -+/* { dg-final { scan-assembler {movl[ \t]l_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t][Ll]_xxx\$non_lazy_ptr-L1\$pb\(%eax\),[ \t]%eax} { target { ia32 && *-*-darwin* } } } } */ Index: gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c =================================================================== --- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c (.../tags/gcc_8_3_0_release) @@ -21718,7 +25162,7 @@ -/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*dispatch" { target *-*-linux* } } } */ +/* { dg-final { scan-assembler {movq[ \t]*_dispatch} { target { lp64 && *-*-darwin* } } } } */ -+/* { dg-final { scan-assembler {movl[ \t]*l_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ ++/* { dg-final { scan-assembler {movl[ \t]*[Ll]_dispatch\$non_lazy_ptr-L[0-9]+\$pb} { target { ia32 && *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "jmp\[ \t\]*_?__x86_indirect_thunk_(r|e)ax" } } */ +/* { dg-final { scan-assembler {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler {call[ \t]*\.?LIND} } } */ @@ -21761,19 +25205,56 @@ -/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */ +/* { dg-final { scan-assembler-not {jmp[ \t]*\.?LIND} } } */ +/* { dg-final { scan-assembler-not {call[ \t]*\.?LIND} } } */ -Index: gcc/testsuite/gcc.target/i386/pr55116-2.c -=================================================================== ---- a/src/gcc/testsuite/gcc.target/i386/pr55116-2.c (.../tags/gcc_8_3_0_release) -+++ b/src/gcc/testsuite/gcc.target/i386/pr55116-2.c (.../branches/gcc-8-branch) -@@ -1,4 +1,5 @@ - /* { dg-do compile { target { ! ia32 } } } */ -+/* { dg-require-effective-target maybe_x32 } */ - /* { dg-options "-O2 -mx32 -maddress-mode=long" } */ - - typedef struct rtx_def *rtx; -Index: gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp +Index: gcc/testsuite/gcc.target/i386/pr91623.c =================================================================== ---- a/src/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp (.../tags/gcc_8_3_0_release) +--- a/src/gcc/testsuite/gcc.target/i386/pr91623.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr91623.c (.../branches/gcc-8-branch) +@@ -0,0 +1,32 @@ ++/* PR middle-end/91623 */ ++/* { dg-do compile } */ ++/* { dg-options "-O3 -msse4.1 -mno-sse4.2" } */ ++ ++typedef long long V __attribute__((__vector_size__(16))); ++V e, h; ++int d; ++const int i; ++ ++void foo (void); ++ ++void ++bar (int k, int l) ++{ ++ if (d && 0 <= k - 1 && l) ++ foo (); ++} ++ ++void ++baz (void) ++{ ++ V n = (V) { 1 }; ++ V g = (V) {}; ++ V o = g; ++ for (int f = 0; f < i; ++f) ++ { ++ V a = o == n; ++ h = a; ++ bar (f, i); ++ o = e; ++ } ++} +Index: gcc/testsuite/gcc.target/i386/pr55116-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.target/i386/pr55116-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.target/i386/pr55116-2.c (.../branches/gcc-8-branch) +@@ -1,4 +1,5 @@ + /* { dg-do compile { target { ! ia32 } } } */ ++/* { dg-require-effective-target maybe_x32 } */ + /* { dg-options "-O2 -mx32 -maddress-mode=long" } */ + + typedef struct rtx_def *rtx; +Index: gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp +=================================================================== +--- a/src/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp (.../branches/gcc-8-branch) @@ -37,7 +37,6 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] { @@ -21897,6 +25378,80 @@ set pattern [format {\t;[^:]+:%d(:[0-9]+)?\n(\t[^\t]+\n)+%s:\n\t.PROC} \ $line $symbol] } elseif { [istarget mips*-*-*] } { +Index: gcc/testsuite/lib/target-supports.exp +=================================================================== +--- a/src/gcc/testsuite/lib/target-supports.exp (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/lib/target-supports.exp (.../branches/gcc-8-branch) +@@ -5018,13 +5018,13 @@ + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } ++ # Darwin doesn't run on power8, so far. ++ if { [istarget *-*-darwin*] } { ++ return 0 ++ } + return [check_no_compiler_messages powerpc_p8vector_ok object { + int main (void) { +-#ifdef __MACH__ +- asm volatile ("xxlorc vs0,vs0,vs0"); +-#else + asm volatile ("xxlorc 0,0,0"); +-#endif + return 0; + } + } "-mpower8-vector"] +@@ -5045,6 +5045,10 @@ + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } ++ # Darwin doesn't run on power9, so far. ++ if { [istarget *-*-darwin*] } { ++ return 0 ++ } + return [check_no_compiler_messages powerpc_p9vector_ok object { + int main (void) { + long e = -1; +@@ -5095,6 +5099,10 @@ + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } ++ # Darwin doesn't have VSX, so no soft support for float128. ++ if { [istarget *-*-darwin*] } { ++ return 0 ++ } + return [check_no_compiler_messages powerpc_float128_sw_ok object { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; +@@ -5121,6 +5129,10 @@ + || [istarget powerpc*-*-aix5.2*] } { + return 0 + } ++ # Darwin doesn't run on any machine with float128 h/w so far. ++ if { [istarget *-*-darwin*] } { ++ return 0 ++ } + return [check_no_compiler_messages powerpc_float128_hw_ok object { + volatile __float128 x = 1.0q; + volatile __float128 y = 2.0q; +@@ -5147,13 +5159,14 @@ + || [istarget powerpc*-*-aix6*] } { + return 0 + } ++ # Darwin doesn't have VSX, even if it's used with an assembler ++ # which recognises the insns. ++ if { [istarget *-*-darwin*] } { ++ return 0 ++ } + return [check_no_compiler_messages powerpc_vsx_ok object { + int main (void) { +-#ifdef __MACH__ +- asm volatile ("xxlor vs0,vs0,vs0"); +-#else + asm volatile ("xxlor 0,0,0"); +-#endif + return 0; + } + } "-mvsx"] Index: gcc/testsuite/gfortran.dg/transfer_simplify_12.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/transfer_simplify_12.f90 (.../tags/gcc_8_3_0_release) @@ -22063,6 +25618,29 @@ +type(array_data) :: foo +call foo%push(42) +end +Index: gcc/testsuite/gfortran.dg/char_result_mod_19.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/char_result_mod_19.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/char_result_mod_19.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,18 @@ ++! { dg-do run } ++! { dg-additional-sources char_result_19.f90 } ++! ++! Module for char_result_19.f90 ++! Tests fix for PR86248 ++! ++module test_module ++ implicit none ++ public :: func_1 ++ private ++ character(len=*),dimension(0:2),parameter :: darray = (/"el0 ","el11","el2 "/) ++contains ++ function func_1 (func_1_input) result(f) ++ integer, intent(in) :: func_1_input ++ character(len = len_trim (darray(func_1_input))) :: f ++ f = darray(func_1_input) ++ end function func_1 ++end module test_module Index: gcc/testsuite/gfortran.dg/pointer_array_11.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/pointer_array_11.f90 (.../tags/gcc_8_3_0_release) @@ -22232,6 +25810,17 @@ + end function + +end module +Index: gcc/testsuite/gfortran.dg/goacc/pr84963.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/goacc/pr84963.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/goacc/pr84963.f90 (.../branches/gcc-8-branch) +@@ -1,5 +1,5 @@ + ! PR ipa/84963 +-! { dg-options "-O2" } ++! { dg-additional-options "-O2" } + + program p + print *, sin([1.0, 2.0]) Index: gcc/testsuite/gfortran.dg/entry_22.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/entry_22.f90 (.../tags/gcc_8_3_0_release) @@ -22591,6 +26180,34 @@ + if (any (a /= 0.0)) stop 1 + if (any (b /= reshape([1234, 2345, 3456, 4567],[2,2]))) stop 2 +end +Index: gcc/testsuite/gfortran.dg/eof_6.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/eof_6.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/eof_6.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,23 @@ ++! { dg-do run } ++! { dg-options "-ffrontend-optimize" } ++! PR 92569 - the EOF condition was not recognized with ++! -ffrontend-optimize. Originjal test case by Bill Lipa. ++program main ++ implicit none ++ real(kind=8) :: tdat(1000,10) ++ real(kind=8) :: res (10, 3) ++ integer :: i, j, k, np ++ ++ open (unit=20, status="scratch") ++ res = reshape([(real(i),i=1,30)], shape(res)) ++ write (20,'(10G12.5)') res ++ rewind 20 ++ do j = 1,1000 ++ read (20,*,end=1)(tdat(j,k),k=1,10) ++ end do ++ ++1 continue ++ np = j-1 ++ if (np /= 3) stop 1 ++ if (any(transpose(res) /= tdat(1:np,:))) stop 2 ++end program main Index: gcc/testsuite/gfortran.dg/deferred_character_33.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/deferred_character_33.f90 (.../tags/gcc_8_3_0_release) @@ -22881,6 +26498,35 @@ + bar = 1 + end function bar +end module x +Index: gcc/testsuite/gfortran.dg/char_result_19.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/char_result_19.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/char_result_19.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,24 @@ ++! { dg-do preprocess } ++! { dg-additional-options "-cpp" } ++! ++! Test the fix for PR86248 ++! ++! Contributed by Bill Long ++! ++program test ++ use test_module ++ implicit none ++ integer :: i ++ character(:), allocatable :: chr ++ do i = 0, 2 ++ chr = func_1 (i) ++ select case (i) ++ case (0) ++ if (chr .ne. 'el0') stop i ++ case (1) ++ if (chr .ne. 'el11') stop i ++ case (2) ++ if (chr .ne. 'el2') stop i ++ end select ++ end do ++end program test Index: gcc/testsuite/gfortran.dg/deferred_character_32.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/deferred_character_32.f90 (.../tags/gcc_8_3_0_release) @@ -22937,6 +26583,22 @@ return } +Index: gcc/testsuite/gfortran.dg/pr92629.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/pr92629.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/pr92629.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,11 @@ ++! { dg-do run } ++! { dg-options "-fno-range-check" } ++! ++! Test the fix for PR92629. ++program bge_tests ++ if (bge (huge (1_1), 128_1)) stop 1 ++ if (bge ( 128_1 , 255_1)) stop 2 ++ if (bge (huge (1_2), 32768_2)) stop 3 ++ if (bge (huge (1_4), 2147483648_4)) stop 4 ++ if (bge (huge (1_8), 9223372036854775808_8)) stop 5 ++end program Index: gcc/testsuite/gfortran.dg/pr91660_2.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/pr91660_2.f90 (.../tags/gcc_8_3_0_release) @@ -22951,6 +26613,24 @@ + type(doublecomplex :: b ! { dg-error "Malformed type-spec" } + type(double complex :: c ! { dg-error "Malformed type-spec" } +end program foo +Index: gcc/testsuite/gfortran.dg/pr69455_2.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/pr69455_2.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/pr69455_2.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,13 @@ ++! { dg-do run } ++program foo ++ block ++ use, intrinsic :: ISO_FORTRAN_ENV, only: wp => REAL32, ik => INT32 ++ if (ik /= 4) stop 1 ++ if (wp /= 4) stop 2 ++ end block ++ block ++ use, intrinsic :: ISO_FORTRAN_ENV, only: wp => REAL64, ik => INT64 ++ if (ik /= 8) stop 3 ++ if (wp /= 8) stop 4 ++ end block ++end program foo Index: gcc/testsuite/gfortran.dg/finalize_28.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/finalize_28.f90 (.../tags/gcc_8_3_0_release) @@ -23306,6 +26986,25 @@ -! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 1 "original" } } +! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 0 "original" } } +Index: gcc/testsuite/gfortran.dg/pr69455_1.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/pr69455_1.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/pr69455_1.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,14 @@ ++! { dg-do run } ++program foo ++ block ++ use, intrinsic :: iso_c_binding, only: wp => c_float, ik => c_int ++ if (ik /= 4) stop 1 ++ if (wp /= 4) stop 2 ++ end block ++ block ++ use, intrinsic :: iso_c_binding, only: wp => c_double, ik => c_int64_t ++ if (ik /= 8) stop 3 ++ if (wp /= 8) stop 4 ++ end block ++end program foo ++ Index: gcc/testsuite/gfortran.dg/pr77583.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/pr77583.f90 (.../tags/gcc_8_3_0_release) @@ -23398,6 +27097,34 @@ + x = F() + end subroutine +end module +Index: gcc/testsuite/gfortran.dg/streamio_18.f90 +=================================================================== +--- a/src/gcc/testsuite/gfortran.dg/streamio_18.f90 (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gfortran.dg/streamio_18.f90 (.../branches/gcc-8-branch) +@@ -0,0 +1,23 @@ ++! { dg-do run } ++! PR91200 ++program foo ++ implicit none ++ integer fd ++ open(newunit=fd, file='test.dat', access='stream', form='formatted') ++ write(fd,'(A)') '$MeshFormat' ++ write(fd,'(A)') 'aabbccdd' ++ close(fd) ++ call readfile ! Read test.dat ++contains ++ subroutine readfile ++ character(len=20) buf1, buf2 ++ integer fd, m, n ++ open(newunit=fd, file='test.dat', access='stream', form='formatted') ++ inquire(fd, pos=m) ++ if (m /= 1) stop 'm /= 1' ++ read(fd, *) buf1 ++ read(fd, *, pos=m) buf2 ! Reread by using pos=1 ++ close(fd, status='delete') ++ if (buf1 /= buf2) stop 'wrong' ++ end subroutine readfile ++end program Index: gcc/testsuite/gfortran.dg/pr88326.f90 =================================================================== --- a/src/gcc/testsuite/gfortran.dg/pr88326.f90 (.../tags/gcc_8_3_0_release) @@ -23612,6 +27339,177 @@ + char *s = pointer_string (0, 0, 0, spec); + return 0; +} +Index: gcc/testsuite/gcc.c-torture/execute/20191023-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/execute/20191023-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/execute/20191023-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,73 @@ ++/* PR tree-optimization/92131 */ ++/* Testcase by Armin Rigo */ ++ ++long b, c, d, e, f, i; ++char g, h, j, k; ++int *aa; ++ ++static void error (void) __attribute__((noipa)); ++static void error (void) { __builtin_abort(); } ++ ++static void see_me_here (void) __attribute__((noipa)); ++static void see_me_here (void) {} ++ ++static void aaa (void) __attribute__((noipa)); ++static void aaa (void) {} ++ ++static void a (void) __attribute__((noipa)); ++static void a (void) { ++ long am, ao; ++ if (aa == 0) { ++ aaa(); ++ if (j) ++ goto ay; ++ } ++ return; ++ay: ++ aaa(); ++ if (k) { ++ aaa(); ++ goto az; ++ } ++ return; ++az: ++ if (i) ++ if (g) ++ if (h) ++ if (e) ++ goto bd; ++ return; ++bd: ++ am = 0; ++ while (am < e) { ++ switch (c) { ++ case 8: ++ goto bh; ++ case 4: ++ return; ++ } ++ bh: ++ if (am >= 0) ++ b = -am; ++ ao = am + b; ++ f = ao & 7; ++ if (f == 0) ++ see_me_here(); ++ if (ao >= 0) ++ am++; ++ else ++ error(); ++ } ++} ++ ++int main (void) ++{ ++ j++; ++ k++; ++ i++; ++ g++; ++ h++; ++ e = 1; ++ a(); ++ return 0; ++} +Index: gcc/testsuite/gcc.c-torture/execute/pr91450-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr91450-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr91450-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,88 @@ ++/* PR middle-end/91450 */ ++ ++__attribute__((noipa)) unsigned long long ++foo (int a, int b) ++{ ++ unsigned long long r; ++ if (!__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ return r; ++} ++ ++__attribute__((noipa)) unsigned long long ++bar (int a, int b) ++{ ++ unsigned long long r; ++ if (a >= 0) ++ return 0; ++ if (!__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ return r; ++} ++ ++__attribute__((noipa)) unsigned long long ++baz (int a, int b) ++{ ++ unsigned long long r; ++ if (b >= 0) ++ return 0; ++ if (!__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ return r; ++} ++ ++__attribute__((noipa)) unsigned long long ++qux (int a, int b) ++{ ++ unsigned long long r; ++ if (a >= 0) ++ return 0; ++ if (b < 0) ++ return 0; ++ if (!__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ return r; ++} ++ ++__attribute__((noipa)) unsigned long long ++quux (int a, int b) ++{ ++ unsigned long long r; ++ if (a < 0) ++ return 0; ++ if (b >= 0) ++ return 0; ++ if (!__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ return r; ++} ++ ++int ++main () ++{ ++ if (foo (-4, 2) != -8ULL) ++ __builtin_abort (); ++ if (foo (2, -4) != -8ULL) ++ __builtin_abort (); ++ if (bar (-4, 2) != -8ULL) ++ __builtin_abort (); ++ if (baz (2, -4) != -8ULL) ++ __builtin_abort (); ++ if (qux (-4, 2) != -8ULL) ++ __builtin_abort (); ++ if (quux (2, -4) != -8ULL) ++ __builtin_abort (); ++ if (foo (-2, 1) != -2ULL) ++ __builtin_abort (); ++ if (foo (1, -2) != -2ULL) ++ __builtin_abort (); ++ if (bar (-2, 1) != -2ULL) ++ __builtin_abort (); ++ if (baz (1, -2) != -2ULL) ++ __builtin_abort (); ++ if (qux (-2, 1) != -2ULL) ++ __builtin_abort (); ++ if (quux (1, -2) != -2ULL) ++ __builtin_abort (); ++ return 0; ++} Index: gcc/testsuite/gcc.c-torture/execute/pr91137.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/execute/pr91137.c (.../tags/gcc_8_3_0_release) @@ -23752,6 +27650,87 @@ + __builtin_abort (); + return 0; +} +Index: gcc/testsuite/gcc.c-torture/execute/pr91450-2.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/execute/pr91450-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/execute/pr91450-2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,76 @@ ++/* PR middle-end/91450 */ ++ ++__attribute__((noipa)) void ++foo (int a, int b) ++{ ++ unsigned long long r; ++ if (__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ if (r != 0) ++ __builtin_abort (); ++} ++ ++__attribute__((noipa)) void ++bar (int a, int b) ++{ ++ unsigned long long r; ++ if (a >= 0) ++ return; ++ if (__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ if (r != 0) ++ __builtin_abort (); ++} ++ ++__attribute__((noipa)) void ++baz (int a, int b) ++{ ++ unsigned long long r; ++ if (b >= 0) ++ return; ++ if (__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ if (r != 0) ++ __builtin_abort (); ++} ++ ++__attribute__((noipa)) void ++qux (int a, int b) ++{ ++ unsigned long long r; ++ if (a >= 0) ++ return; ++ if (b < 0) ++ return; ++ if (__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ if (r != 0) ++ __builtin_abort (); ++} ++ ++__attribute__((noipa)) void ++quux (int a, int b) ++{ ++ unsigned long long r; ++ if (a < 0) ++ return; ++ if (b >= 0) ++ return; ++ if (__builtin_mul_overflow (a, b, &r)) ++ __builtin_abort (); ++ if (r != 0) ++ __builtin_abort (); ++} ++ ++int ++main () ++{ ++ foo (-4, 0); ++ foo (0, -4); ++ foo (0, 0); ++ bar (-4, 0); ++ baz (0, -4); ++ qux (-4, 0); ++ quux (0, -4); ++ return 0; ++} Index: gcc/testsuite/gcc.c-torture/compile/pr89703-2.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/compile/pr89703-2.c (.../tags/gcc_8_3_0_release) @@ -23804,6 +27783,51 @@ + bar (1, &o); + } +} +Index: gcc/testsuite/gcc.c-torture/compile/pr72802.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/compile/pr72802.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr72802.c (.../branches/gcc-8-branch) +@@ -1,3 +1,4 @@ ++/* { dg-skip-if "see PR trail" { *-*-darwin* } } */ + static a[]; + static b, h, m, n, o, p, q, t, u, v, t5, t6, t16, t17, t18, t25; + c; +Index: gcc/testsuite/gcc.c-torture/compile/pr91001.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/compile/pr91001.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr91001.c (.../branches/gcc-8-branch) +@@ -0,0 +1,31 @@ ++/* PR middle-end/91001 */ ++/* PR middle-end/91105 */ ++/* PR middle-end/91106 */ ++ ++struct __attribute__((packed)) S { short b; char c; }; ++struct T { short b, c, d; }; ++struct __attribute__((packed)) R { int b; char c; }; ++union __attribute__((aligned(128), transparent_union)) U { struct S c; } u; ++union __attribute__((aligned(32), transparent_union)) V { struct T c; } v; ++union __attribute__((aligned(32), transparent_union)) W { struct R c; } w; ++void foo (union U); ++void bar (union V); ++void baz (union W); ++ ++void ++qux (void) ++{ ++ foo (u); ++} ++ ++void ++quux (void) ++{ ++ bar (v); ++} ++ ++void ++corge (void) ++{ ++ baz (w); ++} Index: gcc/testsuite/gcc.c-torture/compile/pr89663-1.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c (.../tags/gcc_8_3_0_release) @@ -23890,6 +27914,30 @@ + T (lfloorl) + T (llfloorl) +} +Index: gcc/testsuite/gcc.c-torture/compile/pr90840.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/compile/pr90840.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr90840.c (.../branches/gcc-8-branch) +@@ -0,0 +1,19 @@ ++/* PR middle-end/90840 */ ++struct S { long long a; int b; }; ++struct S foo (void); ++struct __attribute__((packed)) T { long long a; char b; }; ++struct T baz (void); ++ ++void ++bar (void) ++{ ++ _Complex long double c; ++ *(struct S *) &c = foo (); ++} ++ ++void ++qux (void) ++{ ++ _Complex long double c; ++ *(struct T *) &c = baz (); ++} Index: gcc/testsuite/gcc.c-torture/compile/pr89703-1.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/compile/pr89703-1.c (.../tags/gcc_8_3_0_release) @@ -23996,6 +28044,29 @@ + *(struct S *) &h = d; + } +} +Index: gcc/testsuite/gcc.c-torture/compile/pr92056.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/compile/pr92056.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/compile/pr92056.c (.../branches/gcc-8-branch) +@@ -0,0 +1,18 @@ ++/* PR tree-optimization/92056 */ ++ ++const char *d; ++ ++void ++foo (int c, char *e, const char *a, const char *b) ++{ ++ switch (c) ++ { ++ case 33: ++ for (;; d++) ++ if (__builtin_strcmp (b ? : "", d)) ++ return; ++ break; ++ case 4: ++ __builtin_sprintf (e, a); ++ } ++} Index: gcc/testsuite/gcc.c-torture/compile/pr89663-2.c =================================================================== --- a/src/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c (.../tags/gcc_8_3_0_release) @@ -24083,6 +28154,25 @@ + T (lfloorl) + T (llfloorl) +} +Index: gcc/testsuite/gcc.c-torture/compile/20191108-1.c +=================================================================== +--- a/src/gcc/testsuite/gcc.c-torture/compile/20191108-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.c-torture/compile/20191108-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,14 @@ ++/* PR target/92095 */ ++/* Testcase by Sergei Trofimovich */ ++ ++typedef union { ++ double a; ++ int b[2]; ++} c; ++ ++double d(int e) ++{ ++ c f; ++ (&f)->b[0] = 15728640; ++ return e ? -(&f)->a : (&f)->a; ++} Index: gcc/testsuite/gnat.dg/unchecked_convert13.adb =================================================================== --- a/src/gcc/testsuite/gnat.dg/unchecked_convert13.adb (.../tags/gcc_8_3_0_release) @@ -24686,6 +28776,37 @@ + union a f[2] = {-1L}; + g(0, d, f[0]); +} +Index: gcc/testsuite/gcc.dg/torture/pr91812.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/torture/pr91812.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.dg/torture/pr91812.c (.../branches/gcc-8-branch) +@@ -0,0 +1,26 @@ ++/* { dg-do compile } */ ++/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ ++/* { dg-options "-fdump-tree-optimized-blocks" } */ ++ ++unsigned register1; ++unsigned register2; ++ ++void busy_wait_for_register (int x) ++{ ++ volatile unsigned* ptr; ++ switch(x) { ++ case 0x1111: ++ ptr = ®ister1; ++ break; ++ ++ case 0x2222: ++ ptr = ®ister2; ++ break; ++ ++ default: ++ return; ++ } ++ while (*ptr) {} ++} ++ ++/* { dg-final { scan-tree-dump "loop depth 1" "optimized" } } */ Index: gcc/testsuite/gcc.dg/torture/pr91200.c =================================================================== --- a/src/gcc/testsuite/gcc.dg/torture/pr91200.c (.../tags/gcc_8_3_0_release) @@ -25230,6 +29351,26 @@ + __builtin_abort (); + return 0; +} +Index: gcc/testsuite/gcc.dg/vect/pr91665.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/vect/pr91665.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.dg/vect/pr91665.c (.../branches/gcc-8-branch) +@@ -0,0 +1,15 @@ ++/* PR tree-optimization/91665 */ ++/* { dg-do compile } */ ++/* { dg-additional-options "-Ofast" } */ ++ ++short int v; ++ ++void ++foo (short int x, short int y) ++{ ++ short int *p = &v; ++ ++ x = 1; ++ while (x != 0) ++ x += ++y || (*p = x); ++} Index: gcc/testsuite/gcc.dg/vect/pr81740-2.c =================================================================== --- a/src/gcc/testsuite/gcc.dg/vect/pr81740-2.c (.../tags/gcc_8_3_0_release) @@ -25626,13 +29767,35 @@ void (*x)(void) = foo; return 0; } +Index: gcc/testsuite/gcc.dg/pr90898.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/pr90898.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.dg/pr90898.c (.../branches/gcc-8-branch) +@@ -0,0 +1,16 @@ ++/* PR c/90898 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2" } */ ++ ++void *p; ++int bar (void); ++void baz (int *); ++ ++void ++foo (void) ++{ ++ p = __builtin_stack_save (); ++ int a[(bar (), 2)]; ++ baz (a); ++ __builtin_stack_restore (p); ++} Index: gcc/testsuite/gcc.dg/pr90760.c =================================================================== --- a/src/gcc/testsuite/gcc.dg/pr90760.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/gcc.dg/pr90760.c (.../branches/gcc-8-branch) -@@ -0,0 +1,8 @@ +@@ -0,0 +1,9 @@ +/* PR c/90760 */ +/* { dg-do compile } */ ++/* { dg-require-alias "" } */ +/* { dg-require-named-sections "" } */ + +void bar (void) {} @@ -26088,6 +30251,34 @@ + __builtin_abort (); + return 0; +} +Index: gcc/testsuite/gcc.dg/Wnonnull.c +=================================================================== +--- a/src/gcc/testsuite/gcc.dg/Wnonnull.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/gcc.dg/Wnonnull.c (.../branches/gcc-8-branch) +@@ -2,7 +2,10 @@ + { dg-do compile } + { dg-options "-O2 -Wall" } */ + +-#include ++extern __SIZE_TYPE__ strlen (const char *__s) ++ __attribute ((pure)) __attribute ((nonnull (1))); ++extern void *memcpy (void *__restrict __dest, const void *__restrict __src, ++ __SIZE_TYPE__ __n) __attribute ((nonnull (1, 2))); + + char buf[100]; + +@@ -14,9 +17,9 @@ + + __attribute ((nonnull (1, 2))) + inline char* +-my_strcpy (char *restrict dst, const char *restrict src, size_t size) ++my_strcpy (char *restrict dst, const char *restrict src, __SIZE_TYPE__ size) + { +- size_t len = strlen (src); /* { dg-warning "argument 1 null where non-null expected" } */ ++ __SIZE_TYPE__ len = strlen (src); /* { dg-warning "argument 1 null where non-null expected" } */ + if (len < size) + memcpy (dst, src, len + 1); /* { dg-warning "argument 2 null where non-null expected" } */ + else Index: gcc/testsuite/gcc.dg/pr90733.c =================================================================== --- a/src/gcc/testsuite/gcc.dg/pr90733.c (.../tags/gcc_8_3_0_release) @@ -26217,7 +30408,322 @@ =================================================================== --- a/src/gcc/testsuite/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,1844 @@ +@@ -1,3 +1,2159 @@ ++2019-11-29 Harald Anlauf ++ ++ Backport from mainline ++ PR fortran/92629 ++ * gfortran.dg/pr92629.f90: New testcase. ++ ++2019-11-29 Tobias Burnus ++ ++ Backport from mainline ++ 2019-11-29 Tobias Burnus ++ ++ PR ipa/84963 ++ * gfortran.dg/goacc/pr84963.f90: Use dg-additional-options not ++ dg-options as otherwise -fopenacc is not used. ++ ++2019-11-26 Jerry DeLisle ++ ++ Backport from trunk ++ PR fortran/92100 ++ gfortran.dg/streamio_18.f90: New test. ++ ++2019-11-25 Thomas Koenig ++ Harald Anlauf ++ ++ Backport from trunk ++ PR fortran/92569 ++ * gfortran.dg/eof_6.f90: New test. ++ ++2019-11-21 Jakub Jelinek ++ ++ PR tree-optimization/91355 ++ * g++.dg/torture/pr91355.C: New test. ++ ++ Backported from mainline ++ 2019-11-20 Jakub Jelinek ++ ++ PR middle-end/90840 ++ * gcc.c-torture/compile/pr90840.c: New test. ++ ++ PR target/90867 ++ * gcc.target/i386/pr90867.c: New test. ++ ++ PR c/90898 ++ * gcc.dg/pr90898.c: New test. ++ ++ 2019-11-19 Jakub Jelinek ++ ++ PR middle-end/91450 ++ * gcc.c-torture/execute/pr91450-1.c: New test. ++ * gcc.c-torture/execute/pr91450-2.c: New test. ++ ++ 2019-11-08 Jakub Jelinek ++ ++ PR c++/92384 ++ * g++.dg/torture/pr92384.C: New test. ++ ++ 2019-10-31 Jakub Jelinek ++ ++ PR preprocessor/92296 ++ * c-c++-common/cpp/pr92296-1.c: New test. ++ * c-c++-common/cpp/pr92296-2.c: New test. ++ ++ 2019-10-29 Jakub Jelinek ++ ++ PR c++/92201 ++ * g++.dg/other/pr92201.C: New test. ++ ++ 2019-10-17 Jakub Jelinek ++ ++ PR tree-optimization/92056 ++ * gcc.c-torture/compile/pr92056.c: New test. ++ ++ 2019-10-04 Jakub Jelinek ++ ++ PR c++/91974 ++ * g++.dg/cpp1z/eval-order5.C: New test. ++ ++ 2019-09-07 Jakub Jelinek ++ ++ PR tree-optimization/91665 ++ * gcc.dg/vect/pr91665.c: New test. ++ ++ 2019-09-05 Jakub Jelinek ++ ++ PR middle-end/91001 ++ PR middle-end/91105 ++ PR middle-end/91106 ++ * gcc.c-torture/compile/pr91001.c: New test. ++ ++ 2019-09-01 Jakub Jelinek ++ ++ PR middle-end/91623 ++ * gcc.target/i386/pr91623.c: New test. ++ ++ 2019-08-09 Jakub Jelinek ++ ++ PR c/91401 ++ * c-c++-common/gomp/pr91401-1.c: New test. ++ * c-c++-common/gomp/pr91401-2.c: New test. ++ ++2019-11-20 Peter Bergner ++ ++ Backport from mainline ++ 2019-11-13 David Edelsohn ++ ++ * gcc.target/powerpc/pr92090.c: Limit -mbig to powerpc64le-*-*. ++ * gcc.target/powerpc/pr92090-2.c: Likewise. ++ ++ 2019-11-07 Peter Bergner ++ ++ PR other/92090 ++ * gcc.target/powerpc/pr92090-2.c: New test. ++ ++ 2019-11-07 Peter Bergner ++ ++ PR other/92090 ++ * gcc.target/powerpc/pr92090.c: New test. ++ ++2019-11-08 Eric Botcazou ++ ++ * gcc.c-torture/compile/20191108-1.c: New test. ++ * gcc.target/sparc/overflow-1.c: Add -fno-pie to the options. ++ * gcc.target/sparc/overflow-2.c: Likewise. ++ * gcc.target/sparc/overflow-3.c: Likewise. ++ * gcc.target/sparc/overflow-4.c: Likewise. ++ * gcc.target/sparc/overflow-5.c: Likewise. ++ ++2019-11-05 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-06-20 Iain Sandoe ++ ++ * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks. ++ * obj-c++.dg/stubify-2.mm: Likewise. ++ * objc.dg/stubify-1.m: Likewise. ++ * objc.dg/stubify-2.m: Likewise. ++ ++2019-11-03 Iain Sandoe ++ ++ PR c++/79274 ++ * g++.dg/tls/pr77285-2.C: XFAIL test for Darwin. ++ ++2019-11-02 Iain Sandoe ++ ++ Backport from mainline ++ 2019-06-13 Iain Sandoe ++ ++ * gcc.dg/pr90760.c: Require alias support. ++ ++2019-11-01 Delia Burduv ++ ++ Backport from trunk ++ 2019-02-20 Andre Vieira ++ ++ PR target/86487 ++ * gcc.target/arm/pr86487.c: New. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-10-22 Iain Sandoe ++ ++ * gcc.dg/Wnonnull.c: Provide prototypes for strlen and memcpy. ++ Use __SIZE_TYPE__ instead of size_t. ++ ++ Backport from mainline. ++ 2019-10-19 Iain Sandoe ++ ++ * gcc.dg/Wnonnull.c: Add attributed function declarations for ++ memcpy and strlen for Darwin. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-10-13 Iain Sandoe ++ ++ * gcc.target/i386/indirect-thunk-1.c: Allow 'l' or 'L' in ++ indirection label prefix, for Darwin. ++ * gcc.target/i386/indirect-thunk-2.c: Likewise. ++ * gcc.target/i386/indirect-thunk-3.c: Likewise. ++ * gcc.target/i386/indirect-thunk-4.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. ++ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. ++ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. ++ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. ++ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. ++ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. ++ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. ++ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. ++ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. ++ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. ++ * 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-7.c: Likewise. ++ * gcc.target/i386/pr32219-8.c: Likewise. ++ * gcc.target/i386/ret-thunk-14.c: Likewise. ++ * gcc.target/i386/ret-thunk-15.c: Likewise. ++ * gcc.target/i386/ret-thunk-9.c: Likewise. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-08-13 Iain Sandoe ++ ++ * obj-c++.dg/stubify-1.mm: Rename symbol stub option. ++ * obj-c++.dg/stubify-2.mm: Likewise. ++ * objc.dg/stubify-1.m: Likewise. ++ * objc.dg/stubify-2.m: Likewise. ++ ++2019-10-31 Iain Sandoe ++ ++ Backport from mainline. ++ 2019-05-15 Iain Sandoe ++ ++ * 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. ++ ++2019-10-30 Dragan Mladjenovic ++ ++ Backport from mainline ++ 2019-07-09 Dragan Mladjenovic ++ ++ * gcc.target/mips/cfgcleanup-jalr1.c: New test. ++ * gcc.target/mips/cfgcleanup-jalr2.c: New test. ++ * gcc.target/mips/cfgcleanup-jalr3.c: New test. ++ ++2019-10-28 Iain Sandoe ++ ++ * gcc.c-torture/compile/pr72802.c: Skip for Darwin. ++ ++2019-10-28 Jiufu Guo ++ ++ Backport from mainline ++ PR target/70010 ++ * gcc.target/powerpc/pr70010.c: Add -Wno-psabi and -mvsx. ++ ++2019-10-28 Peter Bergner ++ Jiufu Guo ++ ++ PR target/70010 ++ * gcc.target/powerpc/pr70010.c: New test. ++ * gcc.target/powerpc/pr70010-1.c: New test. ++ * gcc.target/powerpc/pr70010-3.c: New test. ++ * gcc.target/powerpc/pr70010-4.c: New test. ++ ++2019-10-27 Paul Thomas ++ ++ Backport from mainline ++ PR fortran/86248 ++ * gfortran.dg/char_result_19.f90 : New test. ++ * gfortran.dg/char_result_mod_19.f90 : Module for the new test. ++ ++2019-10-25 Richard Earnshaw ++ ++ Backport from mainline ++ 2019-05-08 Mihail Ionescu ++ Richard Earnshaw ++ PR target/88167 ++ * gcc.target/arm/pr88167-1.c: New test. ++ * gcc.target/arm/pr88167-2.c: New test. ++ ++2019-10-23 Richard Biener ++ ++ Backport from mainline ++ 2019-10-17 Richard Biener ++ ++ PR debug/91887 ++ * g++.dg/debug/dwarf2/pr91887.C: New testcase. ++ ++ 2019-09-19 Richard Biener ++ ++ PR tree-optimization/91812 ++ * gcc.dg/torture/pr91812.c: New testcase. ++ ++2019-10-23 Eric Botcazou ++ ++ * gcc.c-torture/execute/20191023-1.c: New test. ++ ++2019-10-18 Steven G. Kargl ++ ++ PR fortran/69455 ++ * gfortran.dg/pr69455_1.f90: New test. ++ * gfortran.dg/pr69455_2.f90: Ditto. ++ ++2019-10-17 Bill Schmidt ++ ++ Backport from mainline ++ 2019-10-15 Bill Schmidt ++ ++ PR target/92093 ++ * gcc.target/powerpc/pr91275.c: Fix type and endian issues. ++ ++2019-10-14 Will Schmidt ++ ++ Backport from trunk. ++ 2019-09-26 Will Schmidt ++ ++ * gcc.target/powerpc/pure-builtin-redundant-load.c: New. ++ ++2019-10-10 UroĆĄ Bizjak ++ ++ PR target/92022 ++ * g++.dg/pr92022.C: New test. ++ +2019-10-07 Thomas Koenig + + Backport from trunk @@ -37806,6 +42312,41 @@ -/* { dg-final { run-gcov branches { -b pr16855.C } } } */ +/* { dg-final { run-gcov branches { -b pr16855.C } { xfail *-*-darwin* } } } */ +Index: gcc/testsuite/g++.dg/debug/dwarf2/pr91887.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/debug/dwarf2/pr91887.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/debug/dwarf2/pr91887.C (.../branches/gcc-8-branch) +@@ -0,0 +1,12 @@ ++// { dg-do compile } ++// { dg-require-effective-target c++11 } ++// { dg-options "-g -fdebug-types-section" } ++class A { ++public: ++ A(); ++ template A(U); ++}; ++template struct B { typedef A type; }; ++template ++int Bind(R(Args...), typename B::type...) { return 0; } ++void KeepBufferRefs(A, A) { A a, b(Bind(KeepBufferRefs, a, b)); } +Index: gcc/testsuite/g++.dg/pr92022.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/pr92022.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/pr92022.C (.../branches/gcc-8-branch) +@@ -0,0 +1,13 @@ ++// { dg-do compile { target alpha*-*-* } } ++// { dg-options "-O1 -g -fno-var-tracking -mcpu=ev4 -mieee" } ++ ++struct a { ++ a(long); ++}; ++long b; ++void c() { ++ a d(1); ++ double e = b; ++ for (; b;) ++ d = e; ++} Index: gcc/testsuite/g++.dg/opt/pr90026.C =================================================================== --- a/src/gcc/testsuite/g++.dg/opt/pr90026.C (.../tags/gcc_8_3_0_release) @@ -38501,6 +43042,49 @@ + } +}; +G registrar__body__0__object([](int *) -> H * { O(); return 0; }); +Index: gcc/testsuite/g++.dg/torture/pr92384.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/torture/pr92384.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/torture/pr92384.C (.../branches/gcc-8-branch) +@@ -0,0 +1,38 @@ ++// PR c++/92384 ++// { dg-do run } ++ ++struct S {}; ++struct T : public S { S a, b, c, d, e, f, g, h, i, j, k, l, m; }; ++struct U { long long a, b, c; }; ++ ++U ++foo (S, S, S, T, T, T, U g) ++{ ++ return g; ++} ++ ++__attribute__((noipa)) bool ++bar (S a, S b, S c, T d, T e, T f, U g, void **h) ++{ ++ h[0] = (void *) &a; ++ h[1] = (void *) &b; ++ h[2] = (void *) &c; ++ h[3] = (void *) &d; ++ h[4] = (void *) &e; ++ h[5] = (void *) &f; ++ h[6] = (void *) &g; ++ asm volatile ("" : : "r" (h) : "memory"); ++ return (h[0] != h[1] && h[1] != h[2] && h[2] != h[3] ++ && h[3] != h[4] && h[4] != h[5] && h[5] != h[6]); ++} ++ ++int ++main () ++{ ++ S a; ++ T b; ++ U c = { 1, 2, 3 }; ++ void *d[7]; ++ if (!bar (a, a, a, b, b, b, c, d)) ++ __builtin_abort (); ++} Index: gcc/testsuite/g++.dg/torture/pr90194.C =================================================================== --- a/src/gcc/testsuite/g++.dg/torture/pr90194.C (.../tags/gcc_8_3_0_release) @@ -38524,6 +43108,39 @@ +{ + new (&xn) cb { }; +} +Index: gcc/testsuite/g++.dg/torture/pr91355.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/torture/pr91355.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/torture/pr91355.C (.../branches/gcc-8-branch) +@@ -0,0 +1,28 @@ ++// PR tree-optimization/91355 ++// { dg-do run } ++// { dg-options "-std=c++14" } ++ ++unsigned int d = 0; ++ ++struct S { ++ S () { d++; } ++ S (const S &) { d++; } ++ ~S () { d--; } ++}; ++ ++void ++foo (int i) throw (int) // { dg-warning "dynamic exception specifications are deprecated" } ++{ ++ if (i == 0) ++ throw 3; ++ S d; ++ throw 3; ++} ++ ++int ++main () ++{ ++ try { foo (1); } catch (...) {} ++ if (d) ++ __builtin_abort (); ++} Index: gcc/testsuite/g++.dg/torture/pr89698.C =================================================================== --- a/src/gcc/testsuite/g++.dg/torture/pr89698.C (.../tags/gcc_8_3_0_release) @@ -38821,6 +43438,62 @@ + if (i != 0) + __builtin_abort (); +} +Index: gcc/testsuite/g++.dg/cpp1z/decomp50.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp1z/decomp50.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp1z/decomp50.C (.../branches/gcc-8-branch) +@@ -0,0 +1,51 @@ ++// PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr. ++// { dg-do compile { target c++17 } } ++ ++template struct B; ++template struct B<_Tp *> { typedef _Tp& reference; }; ++struct C { ++ template using rebind = _Up *; ++}; ++template class D { ++public: ++ typename B<_Iterator>::reference operator*(); ++ void operator++(); ++}; ++ ++template ++bool operator!=(D<_Iterator, _Container>, D<_Iterator, _Container>); ++template class F { ++public: ++ typedef _Tp value_type; ++}; ++ ++template struct G { ++ template struct H { using type = C::rebind<_Tp>; }; ++ using const_pointer = typename H::type; ++}; ++template > class I { ++ typedef D::const_pointer, int> const_iterator; ++ ++public: ++ const_iterator begin(); ++ const_iterator end(); ++}; ++ ++struct A { ++ struct J { ++ int name; ++ int value; ++ }; ++ I members; ++ template const int *find(Key) { ++ for (const auto &[name, value] : members) ++ // See ++ // for why we don't warn here. ++ return &value; // { dg-bogus "address of local variable" } ++ return nullptr; ++ } ++}; ++int main() { ++ A a; ++ a.find(""); ++} Index: gcc/testsuite/g++.dg/cpp1z/aggr-base7.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp1z/aggr-base7.C (.../tags/gcc_8_3_0_release) @@ -39014,6 +43687,42 @@ + template static int foo(); + bool b = foo(); +}; +Index: gcc/testsuite/g++.dg/cpp1z/eval-order5.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/cpp1z/eval-order5.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/cpp1z/eval-order5.C (.../branches/gcc-8-branch) +@@ -0,0 +1,31 @@ ++// PR c++/91974 ++// { dg-do run } ++// { dg-options "-fstrong-eval-order" } ++ ++extern "C" void abort (); ++ ++bool ok = false; ++ ++void ++foo (int x) ++{ ++ if (x != 0) ++ abort (); ++ ok = true; ++} ++ ++void ++bar (int) ++{ ++ abort (); ++} ++ ++int ++main () ++{ ++ typedef void (*T) (int); ++ T fn = foo; ++ fn ((fn = bar, 0)); ++ if (fn != bar || !ok) ++ abort (); ++} Index: gcc/testsuite/g++.dg/cpp1z/class-deduction58.C =================================================================== --- a/src/gcc/testsuite/g++.dg/cpp1z/class-deduction58.C (.../tags/gcc_8_3_0_release) @@ -39306,7 +44015,19 @@ +{ + return f5 <0> (p); +} -Index: gcc/testsuite/g++.dg/other/pr88568.C +Index: gcc/testsuite/g++.dg/other/pr92201.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/other/pr92201.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/other/pr92201.C (.../branches/gcc-8-branch) +@@ -0,0 +1,7 @@ ++// PR c++/92201 ++ ++int ++foo (void (*p) ()) ++{ ++ return (*reinterpret_cast (p)) (); ++} +Index: gcc/testsuite/g++.dg/other/pr88568.C =================================================================== --- a/src/gcc/testsuite/g++.dg/other/pr88568.C (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/g++.dg/other/pr88568.C (.../branches/gcc-8-branch) @@ -39692,6 +44413,28 @@ +S *f11 () { return &T::u7; } +template +int *f12 () { return &T::u8.i; } +Index: gcc/testsuite/g++.dg/tls/pr77285-2.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/tls/pr77285-2.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/tls/pr77285-2.C (.../branches/gcc-8-branch) +@@ -3,7 +3,7 @@ + // { dg-require-effective-target tls } + // { dg-final { scan-assembler "_Z4var1B3tag" } } + // { dg-final { scan-assembler "_Z4var2B3tag" } } +-// { dg-final { scan-assembler "_ZTH4var1B3tag" } } ++// { dg-final { scan-assembler "_ZTH4var1B3tag" { xfail *-*-darwin* } } } + // { dg-final { scan-assembler "_ZTW4var1B3tag" } } + + struct __attribute__((abi_tag("tag"))) X { ~X () {} int i = 0; }; +Index: gcc/testsuite/g++.dg/concepts/no-bool1.C +=================================================================== +--- a/src/gcc/testsuite/g++.dg/concepts/no-bool1.C (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/g++.dg/concepts/no-bool1.C (.../branches/gcc-8-branch) +@@ -0,0 +1,4 @@ ++// { dg-do compile { target c++14 } } ++// { dg-additional-options -fconcepts } ++ ++template concept True = true; Index: gcc/testsuite/objc.dg/no-extra-load.m =================================================================== --- a/src/gcc/testsuite/objc.dg/no-extra-load.m (.../tags/gcc_8_3_0_release) @@ -39843,6 +44586,33 @@ #ifdef __NEXT_RUNTIME__ #include +Index: gcc/testsuite/objc.dg/stubify-1.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/stubify-1.m (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/objc.dg/stubify-1.m (.../branches/gcc-8-branch) +@@ -4,7 +4,7 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-require-effective-target ilp32 } */ +-/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4" } */ ++/* { dg-options "-Os -mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */ + + typedef struct objc_object { } *id ; + int x = 41 ; +@@ -28,8 +28,8 @@ + } + @end + +-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */ +-/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */ +-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */ +-/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */ +-/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_bogonic\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */ Index: gcc/testsuite/objc.dg/objc-foreach-4.m =================================================================== --- a/src/gcc/testsuite/objc.dg/objc-foreach-4.m (.../tags/gcc_8_3_0_release) @@ -39911,6 +44681,34 @@ NSArray * createTestVictim(unsigned capacity) { NSMutableArray * arr = [[NSMutableArray alloc] initWithCapacity:capacity]; +Index: gcc/testsuite/objc.dg/stubify-2.m +=================================================================== +--- a/src/gcc/testsuite/objc.dg/stubify-2.m (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/objc.dg/stubify-2.m (.../branches/gcc-8-branch) +@@ -1,10 +1,10 @@ + /* All calls must be properly stubified, m32 only. */ + /* Testcase extracted from TextEdit:Document.m. */ + +-/* { dg-do compile { target powerpc*-*-darwin* } } */ ++/* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-require-effective-target ilp32 } */ +-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4" } */ ++/* { dg-options "-mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */ + + typedef struct objc_object { } *id ; + int x = 41 ; +@@ -30,4 +30,9 @@ + + /* Any symbol_ref of an un-stubified objc_msgSend is an error; look + for "objc_msgSend" in quotes, without the $stub suffix. */ +-/* { dg-final { scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */ ++ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_bogonic\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */ Index: gcc/testsuite/objc.dg/zero-link-1.m =================================================================== --- a/src/gcc/testsuite/objc.dg/zero-link-1.m (.../tags/gcc_8_3_0_release) @@ -40043,7 +44841,14 @@ =================================================================== --- a/src/gcc/testsuite/obj-c++.dg/stubify-1.mm (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/obj-c++.dg/stubify-1.mm (.../branches/gcc-8-branch) -@@ -10,7 +10,7 @@ +@@ -4,13 +4,13 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-require-effective-target ilp32 } */ +-/* { dg-options "-Os -mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4" } */ ++/* { dg-options "-mdynamic-no-pic -fno-exceptions -mmacosx-version-min=10.4 -msymbol-stubs" } */ + + typedef struct objc_object { } *id ; int x = 41 ; extern "C" { @@ -40065,6 +44870,20 @@ - (void)willEndCloseSheet:(void *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { [[self window] close]; ((void (*)(id, char *, int))objc_msgSend)([self class], (char *)contextInfo, 1); +@@ -32,8 +32,8 @@ + } + @end + +-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_objc_msgSend\n" } } */ +-/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_objc_msgSend\\\$stub\n" } } */ +-/* { dg-final { scan-assembler-not "\(bl|call\)\[ \t\]+_bogonic\n" } } */ +-/* { dg-final { scan-assembler "\(bl|call\)\[ \t\]+L_bogonic\\\$stub\n" } } */ +-/* { dg-final { scan-assembler-not "\\\$non_lazy_ptr" } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_bogonic\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_bogonic\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */ Index: gcc/testsuite/obj-c++.dg/isa-field-1.mm =================================================================== --- a/src/gcc/testsuite/obj-c++.dg/isa-field-1.mm (.../tags/gcc_8_3_0_release) @@ -40222,6 +45041,15 @@ =================================================================== --- a/src/gcc/testsuite/obj-c++.dg/stubify-2.mm (.../tags/gcc_8_3_0_release) +++ b/src/gcc/testsuite/obj-c++.dg/stubify-2.mm (.../branches/gcc-8-branch) +@@ -4,7 +4,7 @@ + /* { dg-do compile { target *-*-darwin* } } */ + /* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */ + /* { dg-require-effective-target ilp32 } */ +-/* { dg-options "-mdynamic-no-pic -fdump-rtl-jump -mmacosx-version-min=10.4" } */ ++/* { dg-options "-mdynamic-no-pic -mmacosx-version-min=10.4 -msymbol-stubs" } */ + + typedef struct objc_object { } *id ; + int x = 41 ; @@ -16,9 +16,9 @@ - (Document *) close; @end @@ -40235,6 +45063,17 @@ - (void)willEndCloseSheet:(void *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo { [[self window] close]; ((void (*)(id, char *, int))objc_msgSend)([self class], (char *)contextInfo, 1); +@@ -30,4 +30,9 @@ + + /* Any symbol_ref of an un-stubified objc_msgSend is an error; look + for "objc_msgSend" in quotes, without the $stub suffix. */ +-/* { dg-final { scan-rtl-dump-not "symbol_ref.*\"objc_msgSend\"" "jump" } } */ ++ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_objc_msgSend\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L_objc_msgSend\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {(bl|call)[ \t]+_Z7bogoniciii\n} } } */ ++/* { dg-final { scan-assembler {(bl|call)[ \t]+L__Z7bogoniciii\$stub\n} } } */ ++/* { dg-final { scan-assembler-not {\$non_lazy_ptr} } } */ Index: gcc/testsuite/obj-c++.dg/objc-gc-3.mm =================================================================== --- a/src/gcc/testsuite/obj-c++.dg/objc-gc-3.mm (.../tags/gcc_8_3_0_release) @@ -40303,6 +45142,121 @@ } + return (const char *)0; } +Index: gcc/testsuite/c-c++-common/cpp/pr92296-1.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/cpp/pr92296-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/c-c++-common/cpp/pr92296-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,32 @@ ++/* PR preprocessor/92296 */ ++/* { dg-do preprocess } */ ++ ++#pragma push_macro("__TIMESTAMP__") ++#pragma pop_macro("__TIMESTAMP__") ++ ++#pragma push_macro("__TIME__") ++#pragma pop_macro("__TIME__") ++ ++#pragma push_macro("__DATE__") ++#pragma pop_macro("__DATE__") ++ ++#pragma push_macro("__FILE__") ++#pragma pop_macro("__FILE__") ++ ++#pragma push_macro("__BASE_FILE__") ++#pragma pop_macro("__BASE_FILE__") ++ ++#pragma push_macro("__LINE__") ++#pragma pop_macro("__LINE__") ++ ++#pragma push_macro("__INCLUDE_LEVEL__") ++#pragma pop_macro("__INCLUDE_LEVEL__") ++ ++#pragma push_macro("__COUNTER__") ++#pragma pop_macro("__COUNTER__") ++ ++#pragma push_macro("__has_attribute") ++#pragma pop_macro("__has_attribute") ++ ++#pragma push_macro("__has_cpp_attribute") ++#pragma pop_macro("__has_cpp_attribute") +Index: gcc/testsuite/c-c++-common/cpp/pr92296-2.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/cpp/pr92296-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/c-c++-common/cpp/pr92296-2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,73 @@ ++/* PR preprocessor/92296 */ ++/* { dg-do preprocess } */ ++/* { dg-options "-Wno-builtin-macro-redefined" } */ ++ ++#pragma push_macro("__TIMESTAMP__") ++#undef __TIMESTAMP__ ++#define __TIMESTAMP__ "Thu Oct 31 12:00:00 2019" ++timestamp1 = __TIMESTAMP__ ++#pragma pop_macro("__TIMESTAMP__") ++timestamp2 = __TIMESTAMP__ ++ ++#pragma push_macro("__TIME__") ++#undef __TIME__ ++#define __TIME__ "12:00:00" ++time1 = __TIME__ ++#pragma pop_macro("__TIME__") ++time2 = __TIME__ ++ ++#pragma push_macro("__DATE__") ++#undef __DATE__ ++#define __DATE__ "Oct 31 2019" ++date1 = __DATE__ ++#pragma pop_macro("__DATE__") ++date2 = __DATE__ ++ ++#pragma push_macro("__FILE__") ++#undef __FILE__ ++#define __FILE__ "pr92296-3.c" ++file1 = __FILE__ /* { dg-final { scan-file pr92296-2.i "file1 = \"pr92296-3.c\"" } } */ ++#pragma pop_macro("__FILE__") ++file2 = __FILE__ /* { dg-final { scan-file-not pr92296-2.i "file2 = \"pr92296-3.c\"" } } */ ++ ++#pragma push_macro("__BASE_FILE__") ++#undef __BASE_FILE__ ++#define __BASE_FILE__ "pr92296-4.c" ++filebase1 = __BASE_FILE__ /* { dg-final { scan-file pr92296-2.i "filebase1 = \"pr92296-4.c\"" } } */ ++#pragma pop_macro("__BASE_FILE__") ++filebase2 = __BASE_FILE__ /* { dg-final { scan-file-not pr92296-2.i "filebase2 = \"pr92296-4.c\"" } } */ ++ ++#pragma push_macro("__LINE__") ++#undef __LINE__ /* { dg-warning "undefining" } */ ++#define __LINE__ 142 ++line1 = __LINE__ /* { dg-final { scan-file pr92296-2.i "line1 = 142" } } */ ++#pragma pop_macro("__LINE__") ++line2 = __LINE__ /* { dg-final { scan-file pr92296-2.i "line2 = 45" } } */ ++ ++#pragma push_macro("__INCLUDE_LEVEL__") ++#undef __INCLUDE_LEVEL__ /* { dg-warning "undefining" } */ ++#define __INCLUDE_LEVEL__ 42 ++includelevel1 = __INCLUDE_LEVEL__ /* { dg-final { scan-file pr92296-2.i "includelevel1 = 42" } } */ ++#pragma pop_macro("__INCLUDE_LEVEL__") ++includelevel2 = __INCLUDE_LEVEL__ /* { dg-final { scan-file pr92296-2.i "includelevel2 = 0" } } */ ++ ++#pragma push_macro("__COUNTER__") ++#undef __COUNTER__ /* { dg-warning "undefining" } */ ++#define __COUNTER__ 172 ++counter1 = __COUNTER__ /* { dg-final { scan-file pr92296-2.i "counter1 = 172" } } */ ++#pragma pop_macro("__COUNTER__") ++counter2 = __COUNTER__ /* { dg-final { scan-file-not pr92296-2.i "counter2 = 172" } } */ ++ ++#pragma push_macro("__has_attribute") ++#undef __has_attribute /* { dg-warning "undefining" } */ ++#define __has_attribute(x) 0 ++hasattr1 = __has_attribute(noreturn) /* { dg-final { scan-file pr92296-2.i "hasattr1 = 0" } } */ ++#pragma pop_macro("__has_attribute") ++hasattr2 = __has_attribute(noreturn) /* { dg-final { scan-file-not pr92296-2.i "hasattr2 = 0" } } */ ++ ++#pragma push_macro("__has_cpp_attribute") ++#undef __has_cpp_attribute /* { dg-warning "undefining" } */ ++#define __has_cpp_attribute(x) 0 ++hasattrcpp1 = __has_cpp_attribute(noreturn) /* { dg-final { scan-file pr92296-2.i "hasattrcpp1 = 0" } } */ ++#pragma pop_macro("__has_cpp_attribute") ++hasattrcpp2 = __has_cpp_attribute(noreturn) /* { dg-final { scan-file-not pr92296-2.i "hasattrcpp2 = 0" } } */ Index: gcc/testsuite/c-c++-common/pr90108.c =================================================================== --- a/src/gcc/testsuite/c-c++-common/pr90108.c (.../tags/gcc_8_3_0_release) @@ -40337,6 +45291,26 @@ + a = v; + } +} +Index: gcc/testsuite/c-c++-common/gomp/pr91401-2.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr91401-2.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr91401-2.c (.../branches/gcc-8-branch) +@@ -0,0 +1,15 @@ ++#pragma omp declare target ++void f0 (void); ++ ++void ++f1 (void) ++{ ++ int i; ++ #pragma omp distribute dist_schedule(static) dist_schedule(static) /* { dg-warning "too many 'dist_schedule' clauses" } */ ++ for (i = 0; i < 8; ++i) ++ f0 (); ++ #pragma omp distribute dist_schedule(static,2) dist_schedule(static,4) /* { dg-warning "too many 'dist_schedule' clauses" } */ ++ for (i = 0; i < 8; ++i) ++ f0 (); ++} ++#pragma omp end declare target Index: gcc/testsuite/c-c++-common/gomp/pr90954.c =================================================================== --- a/src/gcc/testsuite/c-c++-common/gomp/pr90954.c (.../tags/gcc_8_3_0_release) @@ -40369,6 +45343,21 @@ + #pragma omp atomic + i *= (x << y); +} +Index: gcc/testsuite/c-c++-common/gomp/pr91401-1.c +=================================================================== +--- a/src/gcc/testsuite/c-c++-common/gomp/pr91401-1.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/testsuite/c-c++-common/gomp/pr91401-1.c (.../branches/gcc-8-branch) +@@ -0,0 +1,10 @@ ++/* PR c/91401 */ ++ ++void ++foo (void) ++{ ++ int i; ++ #pragma omp distribute parallel for schedule (static) dist_schedule (static) ++ for (i = 0; i < 64; i++) ++ ; ++} Index: gcc/testsuite/c-c++-common/pr53633-2.c =================================================================== --- a/src/gcc/testsuite/c-c++-common/pr53633-2.c (.../tags/gcc_8_3_0_release) @@ -40571,6 +45560,19 @@ if (cond == error_mark_node) return cond; +@@ -9092,8 +9109,10 @@ + tree base = DECL_DECOMP_BASE (whats_returned); + if (TREE_CODE (TREE_TYPE (base)) == REFERENCE_TYPE) + { +- tree init = DECL_INITIAL (base); +- return maybe_warn_about_returning_address_of_local (init); ++ if (tree init = DECL_INITIAL (base)) ++ return maybe_warn_about_returning_address_of_local (init); ++ else ++ return false; + } + } + if (TREE_CODE (valtype) == REFERENCE_TYPE) Index: gcc/cp/init.c =================================================================== --- a/src/gcc/cp/init.c (.../tags/gcc_8_3_0_release) @@ -40673,6 +45675,24 @@ const char *msg; if (DECL_INLINE_VAR_P (decl)) msg = G_("sorry: semantics of inline variable " +@@ -8326,7 +8347,7 @@ + (acquire_name, build_function_type_list (integer_type_node, + TREE_TYPE (guard_addr), + NULL_TREE), +- NULL_TREE, ECF_NOTHROW | ECF_LEAF); ++ NULL_TREE, ECF_NOTHROW); + if (!release_fn || !abort_fn) + vfntype = build_function_type_list (void_type_node, + TREE_TYPE (guard_addr), +@@ -8333,7 +8354,7 @@ + NULL_TREE); + if (!release_fn) + release_fn = push_library_fn (release_name, vfntype, NULL_TREE, +- ECF_NOTHROW | ECF_LEAF); ++ ECF_NOTHROW); + if (!abort_fn) + abort_fn = push_library_fn (abort_name, vfntype, NULL_TREE, + ECF_NOTHROW | ECF_LEAF); Index: gcc/cp/method.c =================================================================== --- a/src/gcc/cp/method.c (.../tags/gcc_8_3_0_release) @@ -40690,7 +45710,52 @@ =================================================================== --- a/src/gcc/cp/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/cp/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,248 @@ +@@ -1,3 +1,293 @@ ++2019-11-21 Jakub Jelinek ++ ++ Backported from mainline ++ 2019-10-22 Jakub Jelinek ++ ++ PR tree-optimization/85887 ++ * decl.c (expand_static_init): Drop ECF_LEAF from __cxa_guard_acquire ++ and __cxa_guard_release. ++ ++ 2019-10-29 Jakub Jelinek ++ ++ PR c++/92201 ++ * cp-gimplify.c (cp_gimplify_expr): If gimplify_to_rvalue changes the ++ function pointer type, re-add cast to the original one. ++ ++ 2019-10-04 Jakub Jelinek ++ ++ PR c++/91974 ++ * cp-gimplify.c (cp_gimplify_expr) : For ++ -fstrong-eval-order ensure CALL_EXPR_FN side-effects are evaluated ++ before any arguments. Additionally, ensure CALL_EXPR_FN that isn't ++ invariant nor OBJ_TYPE_REF nor SSA_NAME is forced into a temporary. ++ ++ 2019-08-09 Jakub Jelinek ++ ++ PR c/91401 ++ * parser.c (cp_parser_omp_clause_dist_schedule): Comment out the ++ check_no_duplicate_clause call, instead emit a warning for duplicate ++ dist_schedule clauses. ++ ++2019-11-05 Jason Merrill ++ ++ PR c++/88075 ++ * parser.c (cp_parser_decl_specifier_seq): Support C++20 ++ concept-definition syntax without 'bool'. ++ ++2019-10-22 Marek Polacek ++ ++ Backported from mainline ++ 2019-10-21 Marek Polacek ++ ++ PR c++/92106 - ICE with structured bindings and -Wreturn-local-addr. ++ * typeck.c (maybe_warn_about_returning_address_of_local): Avoid ++ recursing on null initializer and return false instead. ++ +2019-09-03 Iain Sandoe + + Backported from mainline @@ -40999,6 +46064,34 @@ if (exit && !cond_is_first) append_to_statement_list (exit, &stmt_list); +@@ -752,6 +775,27 @@ + + case CALL_EXPR: + ret = GS_OK; ++ if (flag_strong_eval_order == 2 ++ && CALL_EXPR_FN (*expr_p) ++ && cp_get_callee_fndecl_nofold (*expr_p) == NULL_TREE) ++ { ++ tree fnptrtype = TREE_TYPE (CALL_EXPR_FN (*expr_p)); ++ enum gimplify_status t ++ = gimplify_expr (&CALL_EXPR_FN (*expr_p), pre_p, NULL, ++ is_gimple_call_addr, fb_rvalue); ++ if (t == GS_ERROR) ++ ret = GS_ERROR; ++ else if (is_gimple_variable (CALL_EXPR_FN (*expr_p)) ++ && TREE_CODE (CALL_EXPR_FN (*expr_p)) != SSA_NAME) ++ CALL_EXPR_FN (*expr_p) ++ = get_initialized_tmp_var (CALL_EXPR_FN (*expr_p), pre_p, ++ NULL); ++ /* GIMPLE considers most pointer conversion useless, but for ++ calls we actually care about the exact function pointer type. */ ++ if (t != GS_ERROR && TREE_TYPE (CALL_EXPR_FN (*expr_p)) != fnptrtype) ++ CALL_EXPR_FN (*expr_p) ++ = build1 (NOP_EXPR, fnptrtype, CALL_EXPR_FN (*expr_p)); ++ } + if (!CALL_EXPR_FN (*expr_p)) + /* Internal function call. */; + else if (CALL_EXPR_REVERSE_ARGS (*expr_p)) Index: gcc/cp/typeck2.c =================================================================== --- a/src/gcc/cp/typeck2.c (.../tags/gcc_8_3_0_release) @@ -41463,7 +46556,23 @@ cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE); } -@@ -18773,7 +18815,8 @@ +@@ -13510,6 +13552,15 @@ + case RID_CONCEPT: + ds = ds_concept; + cp_lexer_consume_token (parser->lexer); ++ /* In C++20 a concept definition is just 'concept name = expr;' ++ Support that syntax by pretending we've seen 'bool'. */ ++ if (cp_lexer_next_token_is (parser->lexer, CPP_NAME) ++ && cp_lexer_nth_token_is (parser->lexer, 2, CPP_EQ)) ++ { ++ cp_parser_set_decl_spec_type (decl_specs, boolean_type_node, ++ token, /*type_definition*/false); ++ decl_specs->any_type_specifiers_p = true; ++ } + break; + + /* function-specifier: +@@ -18773,7 +18824,8 @@ /*is_declaration=*/true); if (!qscope) qscope = global_namespace; @@ -41473,7 +46582,7 @@ qscope = CP_TYPE_CONTEXT (qscope); if (access_declaration_p && cp_parser_error_occurred (parser)) -@@ -19125,8 +19168,9 @@ +@@ -19125,8 +19177,9 @@ location_t volatile_loc = UNKNOWN_LOCATION; location_t inline_loc = UNKNOWN_LOCATION; location_t goto_loc = UNKNOWN_LOCATION; @@ -41484,7 +46593,7 @@ for (;;) { cp_token *token = cp_lexer_peek_token (parser->lexer); -@@ -19152,6 +19196,8 @@ +@@ -19152,6 +19205,8 @@ } else inline_loc = loc; @@ -41493,7 +46602,7 @@ cp_lexer_consume_token (parser->lexer); continue; -@@ -19163,6 +19209,8 @@ +@@ -19163,6 +19218,8 @@ } else goto_loc = loc; @@ -41502,7 +46611,7 @@ cp_lexer_consume_token (parser->lexer); continue; -@@ -19182,6 +19230,12 @@ +@@ -19182,6 +19239,12 @@ bool inline_p = (inline_loc != UNKNOWN_LOCATION); bool goto_p = (goto_loc != UNKNOWN_LOCATION); @@ -41515,7 +46624,20 @@ /* Look for the opening `('. */ if (!cp_parser_require (parser, CPP_OPEN_PAREN, RT_OPEN_PAREN)) return; -@@ -38680,7 +38734,10 @@ +@@ -33599,8 +33662,10 @@ + else if (!cp_parser_require (parser, CPP_CLOSE_PAREN, RT_COMMA_CLOSE_PAREN)) + goto resync_fail; + +- check_no_duplicate_clause (list, OMP_CLAUSE_DIST_SCHEDULE, "dist_schedule", +- location); ++ /* check_no_duplicate_clause (list, OMP_CLAUSE_DIST_SCHEDULE, ++ "dist_schedule", location); */ ++ if (omp_find_clause (list, OMP_CLAUSE_DIST_SCHEDULE)) ++ warning_at (location, 0, "too many %qs clauses", "dist_schedule"); + OMP_CLAUSE_CHAIN (c) = list; + return c; + +@@ -38680,7 +38745,10 @@ cp_lexer_get_preprocessor_token (NULL, first_token); if (cp_parser_pragma_kind (first_token) != PRAGMA_GCC_PCH_PREPROCESS) @@ -41669,6 +46791,32 @@ {"shared_ptr", "", cxx11}, {"unique_ptr", "", cxx11}, {"weak_ptr", "", cxx11}, +Index: gcc/tree-ssa-ccp.c +=================================================================== +--- a/src/gcc/tree-ssa-ccp.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/tree-ssa-ccp.c (.../branches/gcc-8-branch) +@@ -2082,8 +2082,6 @@ + visited); + else if (chkp_gimple_call_builtin_p (stmt, BUILT_IN_CHKP_BNDRET)) + continue; +- else +- gcc_assert (is_gimple_debug (stmt)); + } + + /* Advance the iterator to the previous non-debug gimple statement in the same +@@ -2108,9 +2106,9 @@ + /* Find a BUILT_IN_STACK_SAVE dominating gsi_stmt (I), and insert + a clobber of VAR before each matching BUILT_IN_STACK_RESTORE. + +- It is possible that BUILT_IN_STACK_SAVE cannot be find in a dominator when a +- previous pass (such as DOM) duplicated it along multiple paths to a BB. In +- that case the function gives up without inserting the clobbers. */ ++ It is possible that BUILT_IN_STACK_SAVE cannot be found in a dominator when ++ a previous pass (such as DOM) duplicated it along multiple paths to a BB. ++ In that case the function gives up without inserting the clobbers. */ + + static void + insert_clobbers_for_var (gimple_stmt_iterator i, tree var) Index: gcc/cgraphclones.c =================================================================== --- a/src/gcc/cgraphclones.c (.../tags/gcc_8_3_0_release) @@ -42226,6 +47374,15 @@ =================================================================== --- a/src/gcc/tree-ssa-sink.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/tree-ssa-sink.c (.../branches/gcc-8-branch) +@@ -229,7 +229,7 @@ + /* If result of comparsion is unknown, preffer EARLY_BB. + Thus use !(...>=..) rather than (...<...) */ + && !(best_bb->count.apply_scale (100, 1) +- > (early_bb->count.apply_scale (threshold, 1)))) ++ >= early_bb->count.apply_scale (threshold, 1))) + return best_bb; + + /* No better block found, so return EARLY_BB, which happens to be the @@ -439,7 +439,10 @@ if (sinkbb == frombb) return false; @@ -42372,7 +47529,59 @@ return false; case MEM: -@@ -31398,7 +31417,7 @@ +@@ -22202,19 +22221,18 @@ + /* If the contexts differ, we may not be talking about the same + thing. + ??? When in LTO the DIE parent is the "abstract" copy and the +- context_die is the specification "copy". But this whole block +- should eventually be no longer needed. */ +- if (parm_die && parm_die->die_parent != context_die && !in_lto_p) ++ context_die is the specification "copy". */ ++ if (parm_die ++ && parm_die->die_parent != context_die ++ && (parm_die->die_parent->die_tag != DW_TAG_GNU_formal_parameter_pack ++ || parm_die->die_parent->die_parent != context_die) ++ && !in_lto_p) + { +- if (!DECL_ABSTRACT_P (node)) +- { +- /* This can happen when creating an inlined instance, in +- which case we need to create a new DIE that will get +- annotated with DW_AT_abstract_origin. */ +- parm_die = NULL; +- } +- else +- gcc_unreachable (); ++ gcc_assert (!DECL_ABSTRACT_P (node)); ++ /* This can happen when creating a concrete instance, in ++ which case we need to create a new DIE that will get ++ annotated with DW_AT_abstract_origin. */ ++ parm_die = NULL; + } + + if (parm_die && parm_die->die_parent == NULL) +@@ -26573,17 +26591,13 @@ + { + dw_die_ref die = lookup_decl_die (decl); + +- /* We may have to generate early debug late for LTO in case debug ++ /* We may have to generate full debug late for LTO in case debug + was not enabled at compile-time or the target doesn't support + the LTO early debug scheme. */ + if (! die && in_lto_p) ++ dwarf2out_decl (decl); ++ else if (die) + { +- dwarf2out_decl (decl); +- die = lookup_decl_die (decl); +- } +- +- if (die) +- { + /* We get called via the symtab code invoking late_global_decl + for symbols that are optimized out. + +@@ -31398,7 +31412,7 @@ ? dl_section_ref : debug_skeleton_line_section_label)); @@ -42381,7 +47590,7 @@ *slot = ctnode; } -@@ -32039,7 +32058,7 @@ +@@ -32039,7 +32053,7 @@ ? debug_line_section_label : debug_skeleton_line_section_label)); @@ -42543,6 +47752,28 @@ win = 1; break; +Index: gcc/ada/sem_spark.adb +=================================================================== +--- a/src/gcc/ada/sem_spark.adb (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/sem_spark.adb (.../branches/gcc-8-branch) +@@ -971,7 +971,7 @@ + + if Present (SPARK_Pragma (Defining_Entity (Body_N))) then + if Get_SPARK_Mode_From_Annotation +- (SPARK_Pragma (Defining_Entity (Body_N, False))) /= Opt.On ++ (SPARK_Pragma (Defining_Entity (Body_N))) /= Opt.On + then + return; + end if; +@@ -2379,7 +2379,7 @@ + CorSp : Node_Id; + + begin +- if Present (SPARK_Pragma (Defining_Entity (Pack, False))) then ++ if Present (SPARK_Pragma (Defining_Entity (Pack))) then + if Get_SPARK_Mode_From_Annotation + (SPARK_Pragma (Defining_Entity (Pack))) /= Opt.On + then Index: gcc/ada/libgnat/system-darwin-ppc.ads =================================================================== --- a/src/gcc/ada/libgnat/system-darwin-ppc.ads (.../tags/gcc_8_3_0_release) @@ -42560,7 +47791,32 @@ =================================================================== --- a/src/gcc/ada/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/ada/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,86 @@ +@@ -1,3 +1,111 @@ ++2019-11-25 Eric Botcazou ++ ++ PR ada/92575 ++ * expect.c (__gnat_expect_poll [VMS, HPUX]): Fix typo. ++ ++2019-10-12 Eric Botcazou ++ ++ PR ada/91995 ++ * sem_ch8.adb (Chain_Use_Clause): Remove second argument in calls ++ to Defining_Entity. ++ * sem_elab.adb (Find_Unit_Entity): Likewise. Deal with N_Subunit ++ here in lieu of in Defining_Entity. ++ * sem_spark.adb (Check_Callable_Body): Likewise. ++ (Check_Package_Body): Likewise. ++ * sem_util.ads (Defining_Entity): Remove 2nd and 3th parameters. ++ * sem_util.adb (Defining_Entity): Remove 2nd and 3th parameters, ++ and adjust accordingly. Deal with N_Compilation_Unit. ++ ++2019-10-11 Eric Botcazou ++ ++ * gcc-interface/decl.c (annotate_value) : Really test the ++ sign of the value when deciding to build a NEGATE_EXPR. ++ : Remove redundant line. ++ : Do the negation here. ++ +2019-09-23 Eric Botcazou + + * gcc-interface/trans.c (Attribute_to_gnu): Test Can_Use_Internal_Rep @@ -42827,6 +48083,43 @@ } /* Return true if DISCR1 and DISCR2 represent the same discriminant. */ +@@ -8083,9 +8107,8 @@ + { + case INTEGER_CST: + /* For negative values, build NEGATE_EXPR of the opposite. Such values +- can appear for discriminants in expressions for variants. Note that, +- sizetype being unsigned, we don't directly use tree_int_cst_sgn. */ +- if (tree_int_cst_sign_bit (gnu_size)) ++ can appear for discriminants in expressions for variants. */ ++ if (tree_int_cst_sgn (gnu_size) < 0) + { + tree t = wide_int_to_tree (sizetype, -wi::to_wide (gnu_size)); + tcode = Negate_Expr; +@@ -8163,9 +8186,8 @@ + && tree_int_cst_sign_bit (TREE_OPERAND (gnu_size, 1))) + { + tcode = Minus_Expr; +- ops[0] = annotate_value (TREE_OPERAND (gnu_size, 0)); +- wide_int op1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1)); +- ops[1] = annotate_value (wide_int_to_tree (sizetype, op1)); ++ wide_int wop1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1)); ++ ops[1] = annotate_value (wide_int_to_tree (sizetype, wop1)); + break; + } + +@@ -8206,9 +8228,9 @@ + Such values can appear in expressions with aligning patterns. */ + if (TREE_CODE (TREE_OPERAND (gnu_size, 1)) == INTEGER_CST) + { +- wide_int op1 = wi::sext (wi::to_wide (TREE_OPERAND (gnu_size, 1)), +- TYPE_PRECISION (sizetype)); +- ops[1] = annotate_value (wide_int_to_tree (sizetype, op1)); ++ wide_int wop1 = -wi::to_wide (TREE_OPERAND (gnu_size, 1)); ++ tree op1 = wide_int_to_tree (sizetype, wop1); ++ ops[1] = annotate_value (build1 (NEGATE_EXPR, sizetype, op1)); + } + break; + Index: gcc/ada/gcc-interface/trans.c =================================================================== --- a/src/gcc/ada/gcc-interface/trans.c (.../tags/gcc_8_3_0_release) @@ -42954,6 +48247,145 @@ return NULL_TREE; } +Index: gcc/ada/sem_util.adb +=================================================================== +--- a/src/gcc/ada/sem_util.adb (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/sem_util.adb (.../branches/gcc-8-branch) +@@ -5714,11 +5714,7 @@ + -- Defining_Entity -- + --------------------- + +- function Defining_Entity +- (N : Node_Id; +- Empty_On_Errors : Boolean := False; +- Concurrent_Subunit : Boolean := False) return Entity_Id +- is ++ function Defining_Entity (N : Node_Id) return Entity_Id is + begin + case Nkind (N) is + when N_Abstract_Subprogram_Declaration +@@ -5769,25 +5765,12 @@ + => + return Defining_Identifier (N); + ++ when N_Compilation_Unit => ++ return Defining_Entity (Unit (N)); ++ + when N_Subunit => +- declare +- Bod : constant Node_Id := Proper_Body (N); +- Orig_Bod : constant Node_Id := Original_Node (Bod); ++ return Defining_Entity (Proper_Body (N)); + +- begin +- -- Retrieve the entity of the original protected or task body +- -- if requested by the caller. +- +- if Concurrent_Subunit +- and then Nkind (Bod) = N_Null_Statement +- and then Nkind_In (Orig_Bod, N_Protected_Body, N_Task_Body) +- then +- return Defining_Entity (Orig_Bod); +- else +- return Defining_Entity (Bod); +- end if; +- end; +- + when N_Function_Instantiation + | N_Function_Specification + | N_Generic_Function_Renaming_Declaration +@@ -5812,14 +5795,10 @@ + -- can continue semantic analysis. + + elsif Nam = Error then +- if Empty_On_Errors then +- return Empty; +- else +- Err := Make_Temporary (Sloc (N), 'T'); +- Set_Defining_Unit_Name (N, Err); ++ Err := Make_Temporary (Sloc (N), 'T'); ++ Set_Defining_Unit_Name (N, Err); + +- return Err; +- end if; ++ return Err; + + -- If not an entity, get defining identifier + +@@ -5834,11 +5813,7 @@ + return Entity (Identifier (N)); + + when others => +- if Empty_On_Errors then +- return Empty; +- else +- raise Program_Error; +- end if; ++ raise Program_Error; + end case; + end Defining_Entity; + +Index: gcc/ada/sem_util.ads +=================================================================== +--- a/src/gcc/ada/sem_util.ads (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/sem_util.ads (.../branches/gcc-8-branch) +@@ -543,10 +543,7 @@ + -- in the case of a descendant of a generic formal type (returns Int'Last + -- instead of 0). + +- function Defining_Entity +- (N : Node_Id; +- Empty_On_Errors : Boolean := False; +- Concurrent_Subunit : Boolean := False) return Entity_Id; ++ function Defining_Entity (N : Node_Id) return Entity_Id; + -- Given a declaration N, returns the associated defining entity. If the + -- declaration has a specification, the entity is obtained from the + -- specification. If the declaration has a defining unit name, then the +@@ -557,22 +554,6 @@ + -- local entities declared during loop expansion. These entities need + -- debugging information, generated through Qualify_Entity_Names, and + -- the loop declaration must be placed in the table Name_Qualify_Units. +- -- +- -- Set flag Empty_On_Error to change the behavior of this routine as +- -- follows: +- -- +- -- * True - A declaration that lacks a defining entity returns Empty. +- -- A node that does not allow for a defining entity returns Empty. +- -- +- -- * False - A declaration that lacks a defining entity is given a new +- -- internally generated entity which is subsequently returned. A node +- -- that does not allow for a defining entity raises Program_Error. +- -- +- -- The former semantics is appropriate for the back end; the latter +- -- semantics is appropriate for the front end. +- -- +- -- Set flag Concurrent_Subunit to handle rewritings of concurrent bodies +- -- which act as subunits. Such bodies are generally rewritten as null. + + function Denotes_Discriminant + (N : Node_Id; +Index: gcc/ada/expect.c +=================================================================== +--- a/src/gcc/ada/expect.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/expect.c (.../branches/gcc-8-branch) +@@ -265,7 +265,7 @@ + if ((status & 1) != 1) + { + ready = -1; +- dead_process = i + 1; ++ *dead_process = i + 1; + return ready; + } + } +@@ -450,7 +450,7 @@ + if (ei.request == TIOCCLOSE) + { + ioctl (fd[i], TIOCREQSET, &ei); +- dead_process = i + 1; ++ *dead_process = i + 1; + return -1; + } + Index: gcc/ada/exp_ch9.adb =================================================================== --- a/src/gcc/ada/exp_ch9.adb (.../tags/gcc_8_3_0_release) @@ -43125,6 +48557,61 @@ - -- avoid function calls every time we want to reset the attributes). - end Osint; +Index: gcc/ada/sem_ch8.adb +=================================================================== +--- a/src/gcc/ada/sem_ch8.adb (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/sem_ch8.adb (.../branches/gcc-8-branch) +@@ -4259,9 +4259,7 @@ + + -- Common case for compilation unit + +- elsif Defining_Entity (N => Parent (N), +- Empty_On_Errors => True) = Current_Scope +- then ++ elsif Defining_Entity (Parent (N)) = Current_Scope then + null; + + else +@@ -4268,7 +4266,7 @@ + -- If declaration appears in some other scope, it must be in some + -- parent unit when compiling a child. + +- Pack := Defining_Entity (Parent (N), Empty_On_Errors => True); ++ Pack := Defining_Entity (Parent (N)); + + if not In_Open_Scopes (Pack) then + null; +Index: gcc/ada/sem_elab.adb +=================================================================== +--- a/src/gcc/ada/sem_elab.adb (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/ada/sem_elab.adb (.../branches/gcc-8-branch) +@@ -5544,13 +5544,23 @@ + N_Procedure_Instantiation) + and then Nkind (Context) = N_Compilation_Unit + then +- return +- Related_Instance (Defining_Entity (N, Concurrent_Subunit => True)); ++ return Related_Instance (Defining_Entity (N)); + ++ -- The unit denotes a concurrent body acting as a subunit. Such bodies ++ -- are generally rewritten into null statements. The proper entity is ++ -- that of the "original node". ++ ++ elsif Nkind (N) = N_Subunit ++ and then Nkind (Proper_Body (N)) = N_Null_Statement ++ and then Nkind_In (Original_Node (Proper_Body (N)), N_Protected_Body, ++ N_Task_Body) ++ then ++ return Defining_Entity (Original_Node (Proper_Body (N))); ++ + -- Otherwise the proper entity is the defining entity + + else +- return Defining_Entity (N, Concurrent_Subunit => True); ++ return Defining_Entity (N); + end if; + end Find_Unit_Entity; + Index: gcc/tree-ssa-address.c =================================================================== --- a/src/gcc/tree-ssa-address.c (.../tags/gcc_8_3_0_release) @@ -44063,7 +49550,40 @@ =================================================================== --- a/src/gcc/fortran/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/gcc/fortran/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,400 @@ +@@ -1,3 +1,433 @@ ++2019-11-29 Harald Anlauf ++ ++ Backport from mainline ++ PR fortran/92629 ++ * simplify.c (convert_mpz_to_unsigned): Skip assert for argument ++ range when -fno-range-check is specified. ++ ++2019-11-10 Thomas Koenig ++ ++ Backport from trunk ++ PR fortran/92113 ++ * trans-decl.c (gfc_get_symbol_decl): If __def_init actually ++ contains a value, put it into the read-only section. ++ ++2019-10-27 Paul Thomas ++ ++ Backport from mainline ++ PR fortran/86248 ++ * resolve.c (flag_fn_result_spec): Correct a typo before the ++ function declaration. ++ * trans-decl.c (gfc_sym_identifier): Boost the length of 'name' ++ to allow for all variants. Simplify the code by using a pointer ++ to the symbol's proc_name and taking the return out of each of ++ the conditional branches. Allow symbols with fn_result_spec set ++ that do not come from a procedure namespace and have a module ++ name to go through the non-fn_result_spec branch. ++ ++2019-10-18 Steven G. Kargl ++ ++ PR fortran/69455 ++ * trans-decl.c (generate_local_decl): Avoid misconstructed ++ intrinsic modules in a BLOCK construct. ++ +2019-10-07 Thomas Koenig + + Backport from trunk @@ -45127,7 +50647,18 @@ if (iter->start->expr_type == EXPR_CONSTANT && iter->end->expr_type == EXPR_CONSTANT && iter->step->expr_type == EXPR_CONSTANT) -@@ -7640,13 +7681,54 @@ +@@ -7215,6 +7256,10 @@ + for (ref = result->ref; ref; ref = ref->next) + if (ref->type == REF_ARRAY && ref->next == NULL) + { ++ if (ref->u.ar.dimen == 0 ++ && ref->u.ar.as && ref->u.ar.as->corank) ++ return result; ++ + ref->u.ar.type = AR_FULL; + + for (i = 0; i < ref->u.ar.dimen; i++) +@@ -7640,13 +7685,54 @@ if (codimension) for (i = ar->dimen; i < ar->dimen + ar->codimen; i++) @@ -45188,7 +50719,7 @@ for (i = 0; i < ar->dimen; i++) { if (ar->type == AR_ELEMENT || ar->type == AR_FULL) -@@ -11011,6 +11093,9 @@ +@@ -11011,6 +11097,9 @@ if (!gfc_check_dependency ((*code)->expr1, (*code)->expr2, 1)) return false; @@ -45198,7 +50729,7 @@ tmp_expr = get_temp_from_expr ((*code)->expr1, ns); tmp_expr->where = (*code)->loc; -@@ -11647,7 +11732,7 @@ +@@ -11647,7 +11736,7 @@ && (gsym->type == GSYM_FUNCTION || gsym->type == GSYM_SUBROUTINE))) { if (!gsym) @@ -45207,6 +50738,17 @@ gsym->where = sym->declared_at; gsym->sym_name = sym->name; gsym->binding_label = sym->binding_label; +@@ -16266,8 +16355,8 @@ + } + + +-/* Function called by resolve_fntype to flag other symbol used in the +- length type parameter specification of function resuls. */ ++/* Function called by resolve_fntype to flag other symbols used in the ++ length type parameter specification of function results. */ + + static bool + flag_fn_result_spec (gfc_expr *expr, Index: gcc/fortran/iresolve.c =================================================================== --- a/src/gcc/fortran/iresolve.c (.../tags/gcc_8_3_0_release) @@ -45234,7 +50776,7 @@ =================================================================== --- a/src/gcc/fortran/trans-decl.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/fortran/trans-decl.c (.../branches/gcc-8-branch) -@@ -342,39 +342,45 @@ +@@ -342,40 +342,45 @@ } } @@ -45272,7 +50814,8 @@ { - char name[GFC_MAX_MANGLED_SYMBOL_LEN + 1]; - -+ static char name[GFC_MAX_MANGLED_SYMBOL_LEN + 1]; ++ gfc_symbol *proc = sym->ns->proc_name; ++ static char name[3*GFC_MAX_MANGLED_SYMBOL_LEN + 14]; /* Prevent the mangling of identifiers that have an assigned binding label (mainly those that are bind(c)). */ + @@ -45280,34 +50823,50 @@ - return get_identifier (sym->binding_label); + return sym->binding_label; - if (!sym->fn_result_spec) +- if (!sym->fn_result_spec) ++ if (!sym->fn_result_spec ++ || (sym->module && !(proc && proc->attr.flavor == FL_PROCEDURE))) { if (sym->module == NULL) - return gfc_sym_identifier (sym); + return sym_identifier (sym); else - { - snprintf (name, sizeof name, "__%s_MOD_%s", sym->module, sym->name); +- { +- snprintf (name, sizeof name, "__%s_MOD_%s", sym->module, sym->name); - return get_identifier (name); -+ return name; - } +- } ++ snprintf (name, sizeof name, "__%s_MOD_%s", sym->module, sym->name); } else -@@ -389,18 +395,41 @@ - sym->ns->proc_name->module, - sym->ns->proc_name->name, - sym->name); + { +@@ -382,25 +387,42 @@ + /* This is an entity that is actually local to a module procedure + that appears in the result specification expression. Since + sym->module will be a zero length string, we use ns->proc_name +- instead. */ +- if (sym->ns->proc_name && sym->ns->proc_name->module) +- { +- snprintf (name, sizeof name, "__%s_MOD__%s_PROC_%s", +- sym->ns->proc_name->module, +- sym->ns->proc_name->name, +- sym->name); - return get_identifier (name); -+ return name; - } +- } ++ to provide the module name instead. */ ++ if (proc && proc->module) ++ snprintf (name, sizeof name, "__%s_MOD__%s_PROC_%s", ++ proc->module, proc->name, sym->name); else - { - snprintf (name, sizeof name, "__%s_PROC_%s", - sym->ns->proc_name->name, sym->name); +- { +- snprintf (name, sizeof name, "__%s_PROC_%s", +- sym->ns->proc_name->name, sym->name); - return get_identifier (name); -+ return name; - } +- } ++ snprintf (name, sizeof name, "__%s_PROC_%s", ++ proc->name, sym->name); } ++ ++ return name; } +/* Get mangled identifier, adding the symbol to the global table if @@ -45337,7 +50896,7 @@ /* Construct mangled function name from symbol name. */ static tree -@@ -839,7 +868,7 @@ +@@ -839,7 +861,7 @@ { if (!gsym) { @@ -45346,16 +50905,30 @@ gsym->type = GSYM_MODULE; gsym->ns = gfc_get_namespace (NULL, 0); } -@@ -1865,7 +1894,7 @@ +@@ -1863,10 +1885,19 @@ + if (sym->attr.associate_var) + GFC_DECL_ASSOCIATE_VAR_P (decl) = 1; - if (sym->attr.vtab - || (sym->name[0] == '_' && strncmp ("__def_init", sym->name, 10) == 0)) +- if (sym->attr.vtab +- || (sym->name[0] == '_' && strncmp ("__def_init", sym->name, 10) == 0)) - TREE_READONLY (decl) = 1; -+ DECL_ARTIFICIAL (decl) = 1; - ++ /* We only mark __def_init as read-only if it actually has an ++ initializer so it does not needlessly take up space in the ++ read-only section and can go into the BSS instead, see PR 84487. ++ Marking this as artificial means that OpenMP will treat this as ++ predetermined shared. */ + ++ if (sym->attr.vtab || strncmp ("__def_init", sym->name, 10) == 0) ++ { ++ DECL_ARTIFICIAL (decl) = 1; ++ if (sym->attr.vtab || sym->value) ++ TREE_READONLY (decl) = 1; ++ } ++ return decl; } -@@ -1905,6 +1934,22 @@ + +@@ -1905,6 +1936,22 @@ tree decl; tree attributes; @@ -45378,7 +50951,7 @@ decl = sym->backend_decl; if (decl) return decl; -@@ -1977,7 +2022,7 @@ +@@ -1977,7 +2024,7 @@ /* Get a basic decl for an external function. */ tree @@ -45387,7 +50960,7 @@ { tree type; tree fndecl; -@@ -2002,10 +2047,23 @@ +@@ -2002,10 +2049,23 @@ return get_proc_pointer_decl (sym); /* See if this is an external procedure from the same file. If so, @@ -45414,7 +50987,7 @@ if (gsym && !gsym->defined) gsym = NULL; -@@ -2150,7 +2208,7 @@ +@@ -2150,7 +2210,7 @@ mangled_name = gfc_sym_mangled_function_id (sym); } @@ -45423,7 +50996,7 @@ fndecl = build_decl (input_location, FUNCTION_DECL, name, type); -@@ -2500,6 +2558,17 @@ +@@ -2500,6 +2560,17 @@ TREE_READONLY (length) = 1; gfc_finish_decl (length); @@ -45441,7 +51014,7 @@ /* Remember the passed value. */ if (!f->sym->ts.u.cl || f->sym->ts.u.cl->passed_length) { -@@ -5384,6 +5453,33 @@ +@@ -5384,6 +5455,33 @@ /* Handle "static" initializer. */ if (sym->value) { @@ -45475,7 +51048,7 @@ sym->attr.pointer = 1; tmp = gfc_trans_assignment (gfc_lval_expr_from_sym (sym), sym->value, true, false); -@@ -5628,9 +5724,11 @@ +@@ -5628,9 +5726,11 @@ } else if (warn_unused_dummy_argument) { @@ -45490,6 +51063,22 @@ if (sym->backend_decl != NULL_TREE) TREE_NO_WARNING(sym->backend_decl) = 1; } +@@ -5722,7 +5822,14 @@ + + if (sym->ns && sym->ns->construct_entities) + { +- if (sym->attr.referenced) ++ /* Construction of the intrinsic modules within a BLOCK ++ construct, where ONLY and RENAMED entities are included, ++ seems to be bogus. This is a workaround that can be removed ++ if someone ever takes on the task to creating full-fledge ++ modules. See PR 69455. */ ++ if (sym->attr.referenced ++ && sym->from_intmod != INTMOD_ISO_C_BINDING ++ && sym->from_intmod != INTMOD_ISO_FORTRAN_ENV) + gfc_get_symbol_decl (sym); + sym->mark = 1; + } Index: gcc/fortran/target-memory.c =================================================================== --- a/src/gcc/fortran/target-memory.c (.../tags/gcc_8_3_0_release) @@ -45882,7 +51471,20 @@ =================================================================== --- a/src/gcc/fortran/simplify.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/fortran/simplify.c (.../branches/gcc-8-branch) -@@ -4469,7 +4469,7 @@ +@@ -169,8 +169,10 @@ + } + else + { +- /* Confirm that no bits above the signed range are set. */ +- gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX); ++ /* Confirm that no bits above the signed range are set if we ++ are doing range checking. */ ++ if (flag_range_check != 0) ++ gcc_assert (mpz_scan1 (x, bitsize-1) == ULONG_MAX); + } + } + +@@ -4469,7 +4471,7 @@ /* The expression in assoc->target points to a ref to the _data component of the unlimited polymorphic entity. To get the _len component the last _data ref needs to be stripped and a ref to the _len component added. */ @@ -45891,7 +51493,7 @@ else return NULL; } -@@ -6921,6 +6921,7 @@ +@@ -6921,6 +6923,7 @@ { gfc_expr *result = NULL; mpz_t array_size; @@ -45899,7 +51501,7 @@ if (x->ts.type == BT_CLASS || x->ts.deferred) return NULL; -@@ -6936,7 +6937,8 @@ +@@ -6936,7 +6939,8 @@ result = gfc_get_constant_expr (BT_INTEGER, gfc_index_integer_kind, &x->where); @@ -45909,7 +51511,7 @@ return result; } -@@ -6950,6 +6952,7 @@ +@@ -6950,6 +6954,7 @@ { gfc_expr *result = NULL; int k; @@ -45917,7 +51519,7 @@ if (x->ts.type == BT_CLASS || x->ts.deferred) return NULL; -@@ -6965,7 +6968,8 @@ +@@ -6965,7 +6970,8 @@ result = gfc_get_constant_expr (BT_INTEGER, k, &x->where); @@ -45951,6 +51553,83 @@ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` fi +@@ -6143,7 +6139,8 @@ + all_languages= + all_compilers= + all_outputs='Makefile' +-# List of language makefile fragments. ++# List of language configure and makefile fragments. ++all_lang_configurefrags= + all_lang_makefrags= + # Additional files for gengtype + all_gtfiles="$target_gtfiles" +@@ -6231,6 +6228,7 @@ + esac + $ok || continue + ++ all_lang_configurefrags="$all_lang_configurefrags \$(srcdir)/$gcc_subdir/config-lang.in" + all_lang_makefrags="$all_lang_makefrags \$(srcdir)/$gcc_subdir/Make-lang.in" + if test -f $srcdir/$gcc_subdir/lang.opt; then + lang_opt_files="$lang_opt_files $srcdir/$gcc_subdir/lang.opt" +@@ -6332,6 +6330,7 @@ + AC_SUBST(srcdir) + AC_SUBST(all_compilers) + AC_SUBST(all_gtfiles) ++AC_SUBST(all_lang_configurefrags) + AC_SUBST(all_lang_makefrags) + AC_SUBST(all_languages) + AC_SUBST(all_selected_languages) +Index: gcc/function.c +=================================================================== +--- a/src/gcc/function.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/function.c (.../branches/gcc-8-branch) +@@ -2477,8 +2477,7 @@ + /* If the parm is to be passed as a transparent union or record, use the + type of the first field for the tests below. We have already verified + that the modes are the same. */ +- if ((TREE_CODE (passed_type) == UNION_TYPE +- || TREE_CODE (passed_type) == RECORD_TYPE) ++ if (RECORD_OR_UNION_TYPE_P (passed_type) + && TYPE_TRANSPARENT_AGGR (passed_type)) + passed_type = TREE_TYPE (first_field (passed_type)); + +@@ -3098,7 +3097,7 @@ + move_block_from_reg (REGNO (entry_parm), mem, + size_stored / UNITS_PER_WORD); + } +- else if (data->stack_parm == 0) ++ else if (data->stack_parm == 0 && !TYPE_EMPTY_P (data->passed_type)) + { + push_to_sequence2 (all->first_conversion_insn, all->last_conversion_insn); + emit_block_move (stack_parm, data->entry_parm, GEN_INT (size), +@@ -3474,7 +3473,9 @@ + dest = validize_mem (copy_rtx (data->stack_parm)); + src = validize_mem (copy_rtx (data->entry_parm)); + +- if (MEM_P (src)) ++ if (TYPE_EMPTY_P (data->passed_type)) ++ /* Empty types don't really need to be copied. */; ++ else if (MEM_P (src)) + { + /* Use a block move to handle potentially misaligned entry_parm. */ + if (!to_conversion) +@@ -3749,6 +3750,16 @@ + { + assign_parm_find_stack_rtl (parm, &data); + assign_parm_adjust_entry_rtl (&data); ++ /* For arguments that occupy no space in the parameter ++ passing area, have non-zero size and have address taken, ++ force creation of a stack slot so that they have distinct ++ address from other parameters. */ ++ if (TYPE_EMPTY_P (data.passed_type) ++ && TREE_ADDRESSABLE (parm) ++ && data.entry_parm == data.stack_parm ++ && MEM_P (data.entry_parm) ++ && int_size_in_bytes (data.passed_type)) ++ data.stack_parm = NULL_RTX; + } + if (!POINTER_BOUNDS_TYPE_P (data.passed_type)) + { Index: gcc/gcse.c =================================================================== --- a/src/gcc/gcse.c (.../tags/gcc_8_3_0_release) @@ -46167,6 +51846,21 @@ } +@@ -6853,10 +6808,13 @@ + gcc_assert (TREE_CODE (base) == INTEGER_CST + && TREE_CODE (step) == INTEGER_CST); + cond_reduc_val = NULL_TREE; ++ tree res = PHI_RESULT (STMT_VINFO_STMT (cond_stmt_vinfo)); ++ if (!types_compatible_p (TREE_TYPE (res), TREE_TYPE (base))) ++ ; + /* Find a suitable value, for MAX_EXPR below base, for MIN_EXPR + above base; punt if base is the minimum value of the type for + MAX_EXPR or maximum value of the type for MIN_EXPR for now. */ +- if (tree_int_cst_sgn (step) == -1) ++ else if (tree_int_cst_sgn (step) == -1) + { + cond_reduc_op_code = MIN_EXPR; + if (tree_int_cst_sgn (base) == -1) Index: gcc/tree-data-ref.c =================================================================== --- a/src/gcc/tree-data-ref.c (.../tags/gcc_8_3_0_release) @@ -46529,6 +52223,17 @@ && dbg_cnt (asan_use_after_scope) && !gimplify_omp_ctxp) { +@@ -8160,8 +8181,8 @@ + break; + if (scp) + continue; +- gcc_assert (offset == NULL_TREE +- || poly_int_tree_p (offset)); ++ gcc_assert (offset2 == NULL_TREE ++ || poly_int_tree_p (offset2)); + tree d1 = OMP_CLAUSE_DECL (*sc); + tree d2 = OMP_CLAUSE_DECL (c); + while (TREE_CODE (d1) == ARRAY_REF) @@ -9011,6 +9032,19 @@ omp_find_stores_op, &wi); } @@ -46572,7 +52277,35 @@ =================================================================== --- a/src/gcc/lra-constraints.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/lra-constraints.c (.../branches/gcc-8-branch) -@@ -2315,6 +2315,8 @@ +@@ -1774,14 +1774,24 @@ + return false; + code = GET_CODE (x); + mode = GET_MODE (x); ++ + if (code == SUBREG) + { ++ /* For all SUBREGs we want to check whether the full multi-register ++ overlaps the set. For normal SUBREGs this means 'get_hard_regno' of ++ the inner register, for paradoxical SUBREGs this means the ++ 'get_hard_regno' of the full SUBREG and for complete SUBREGs either is ++ fine. Use the wider mode for all cases. */ ++ rtx subreg = SUBREG_REG (x); + mode = wider_subreg_mode (x); +- x = SUBREG_REG (x); +- code = GET_CODE (x); ++ if (mode == GET_MODE (subreg)) ++ { ++ x = subreg; ++ code = GET_CODE (x); ++ } + } + +- if (REG_P (x)) ++ if (REG_P (x) || SUBREG_P (x)) + { + x_hard_regno = get_hard_regno (x, true); + return (x_hard_regno >= 0 +@@ -2315,6 +2325,8 @@ break; reg: @@ -46581,7 +52314,7 @@ this_alternative = reg_class_subunion[this_alternative][cl]; IOR_HARD_REG_SET (this_alternative_set, reg_class_contents[cl]); -@@ -2325,8 +2327,6 @@ +@@ -2325,8 +2337,6 @@ IOR_HARD_REG_SET (this_costly_alternative_set, reg_class_contents[cl]); } @@ -46590,7 +52323,17 @@ winreg = true; if (REG_P (op)) { -@@ -6293,6 +6293,7 @@ +@@ -5767,6 +5777,9 @@ + enum rtx_code code; + int i, j; + ++ if (side_effects_p (x)) ++ return false; ++ + code = GET_CODE (x); + mode = GET_MODE (x); + if (code == SUBREG) +@@ -6293,6 +6306,7 @@ add_to_hard_reg_set (&s, PSEUDO_REGNO_MODE (dst_regno), reg_renumber[dst_regno]); AND_COMPL_HARD_REG_SET (live_hard_regs, s); @@ -46618,7 +52361,51 @@ =================================================================== --- a/src/gcc/calls.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/calls.c (.../branches/gcc-8-branch) -@@ -3754,6 +3754,28 @@ +@@ -2078,8 +2078,7 @@ + /* If TYPE is a transparent union or record, pass things the way + we would pass the first field of the union or record. We have + already verified that the modes are the same. */ +- if ((TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == RECORD_TYPE) +- && TYPE_TRANSPARENT_AGGR (type)) ++ if (RECORD_OR_UNION_TYPE_P (type) && TYPE_TRANSPARENT_AGGR (type)) + type = TREE_TYPE (first_field (type)); + + /* Decide where to pass this arg. +@@ -2873,6 +2872,9 @@ + poly_int64 size = 0; + HOST_WIDE_INT const_size = 0; + rtx_insn *before_arg = get_last_insn (); ++ tree type = TREE_TYPE (args[i].tree_value); ++ if (RECORD_OR_UNION_TYPE_P (type) && TYPE_TRANSPARENT_AGGR (type)) ++ type = TREE_TYPE (first_field (type)); + /* Set non-negative if we must move a word at a time, even if + just one word (e.g, partial == 4 && mode == DFmode). Set + to -1 if we just use a normal move insn. This value can be +@@ -2885,11 +2887,11 @@ + gcc_assert (partial % UNITS_PER_WORD == 0); + nregs = partial / UNITS_PER_WORD; + } +- else if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode) ++ else if (TYPE_MODE (type) == BLKmode) + { + /* Variable-sized parameters should be described by a + PARALLEL instead. */ +- const_size = int_size_in_bytes (TREE_TYPE (args[i].tree_value)); ++ const_size = int_size_in_bytes (type); + gcc_assert (const_size >= 0); + nregs = (const_size + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD; + size = const_size; +@@ -3016,8 +3018,7 @@ + if (GET_CODE (reg) == PARALLEL) + use_group_regs (call_fusage, reg); + else if (nregs == -1) +- use_reg_mode (call_fusage, reg, +- TYPE_MODE (TREE_TYPE (args[i].tree_value))); ++ use_reg_mode (call_fusage, reg, TYPE_MODE (type)); + else if (nregs > 0) + use_regs (call_fusage, REGNO (reg), nregs); + } +@@ -3754,6 +3755,28 @@ || dbg_cnt (tail_call) == false) try_tail_call = 0; @@ -46767,7 +52554,35 @@ =================================================================== --- a/src/gcc/expmed.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/expmed.c (.../branches/gcc-8-branch) -@@ -3352,13 +3352,20 @@ +@@ -838,6 +838,27 @@ + if (MEM_P (op0)) + op0 = adjust_bitfield_address_size (op0, op0_mode.else_blk (), + 0, MEM_SIZE (op0)); ++ else if (!op0_mode.exists ()) ++ { ++ if (ibitnum == 0 ++ && known_eq (ibitsize, GET_MODE_BITSIZE (GET_MODE (op0))) ++ && MEM_P (value) ++ && !reverse) ++ { ++ value = adjust_address (value, GET_MODE (op0), 0); ++ emit_move_insn (op0, value); ++ return true; ++ } ++ if (!fallback_p) ++ return false; ++ rtx temp = assign_stack_temp (GET_MODE (op0), ++ GET_MODE_SIZE (GET_MODE (op0))); ++ emit_move_insn (temp, op0); ++ store_bit_field_1 (temp, bitsize, bitnum, 0, 0, fieldmode, value, ++ reverse, fallback_p); ++ emit_move_insn (op0, temp); ++ return true; ++ } + else + op0 = gen_lowpart (op0_mode.require (), op0); + } +@@ -3352,13 +3373,20 @@ tem = gen_lowpart (nmode, op0); } @@ -46973,7 +52788,30 @@ =================================================================== --- a/src/gcc/cfgcleanup.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/cfgcleanup.c (.../branches/gcc-8-branch) -@@ -2705,23 +2705,23 @@ +@@ -53,6 +53,7 @@ + #include "dce.h" + #include "dbgcnt.h" + #include "rtl-iter.h" ++#include "regs.h" + + #define FORWARDER_BLOCK_P(BB) ((BB)->flags & BB_FORWARDER_BLOCK) + +@@ -1217,6 +1218,14 @@ + } + } + } ++ ++ HARD_REG_SET i1_used, i2_used; ++ ++ get_call_reg_set_usage (i1, &i1_used, call_used_reg_set); ++ get_call_reg_set_usage (i2, &i2_used, call_used_reg_set); ++ ++ if (!hard_reg_set_equal_p (i1_used, i2_used)) ++ return dir_none; + } + + /* If both i1 and i2 are frame related, verify all the CFA notes +@@ -2705,23 +2714,23 @@ if (current_ir_type () == IR_RTL_CFGLAYOUT) { @@ -47718,6 +53556,42 @@ call_for_symbol_and_aliases (symtab_node::set_section, const_cast(section), true); } +Index: gcc/tree-ssa-phiprop.c +=================================================================== +--- a/src/gcc/tree-ssa-phiprop.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/tree-ssa-phiprop.c (.../branches/gcc-8-branch) +@@ -338,8 +338,15 @@ + && (!type + || types_compatible_p + (TREE_TYPE (gimple_assign_lhs (use_stmt)), type)) +- /* We cannot replace a load that may throw or is volatile. */ +- && !stmt_can_throw_internal (use_stmt))) ++ /* We cannot replace a load that may throw or is volatile. ++ For volatiles the transform can change the number of ++ executions if the load is inside a loop but the address ++ computations outside (PR91812). We could relax this ++ if we guard against that appropriately. For loads that can ++ throw we could relax things if the moved loads all are ++ known to not throw. */ ++ && !stmt_can_throw_internal (use_stmt) ++ && !gimple_has_volatile_ops (use_stmt))) + continue; + + /* Check if we can move the loads. The def stmt of the virtual use +Index: gcc/tree-object-size.c +=================================================================== +--- a/src/gcc/tree-object-size.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/tree-object-size.c (.../branches/gcc-8-branch) +@@ -899,6 +899,9 @@ + else + expr_object_size (osi, var, then_); + ++ if (object_sizes[object_size_type][varno] == unknown[object_size_type]) ++ return reexamine; ++ + if (TREE_CODE (else_) == SSA_NAME) + reexamine |= merge_object_sizes (osi, var, else_, 0); + else Index: gcc/tree-outof-ssa.c =================================================================== --- a/src/gcc/tree-outof-ssa.c (.../tags/gcc_8_3_0_release) @@ -47878,7 +53752,36 @@ extra_headers=altivec.h ;; powerpc*-*-freebsd*) -@@ -4676,8 +4692,11 @@ +@@ -4447,14 +4463,12 @@ + echo "#undef LINK_OS_EXTRA_SPEC32" + echo "#define LINK_OS_EXTRA_SPEC32" \ + "\"%(link_os_new_dtags)" \ +- "-rpath $prefix/lib -rpath $at/lib" \ +- "-L $prefix/lib -L $at/lib\"" ++ "-rpath $prefix/lib -rpath $at/lib\"" + echo + echo "#undef LINK_OS_EXTRA_SPEC64" + echo "#define LINK_OS_EXTRA_SPEC64" \ + "\"%(link_os_new_dtags)" \ +- "-rpath $prefix/lib64 -rpath $at/lib64" \ +- "-L $prefix/lib64 -L $at/lib64\"" ++ "-rpath $prefix/lib64 -rpath $at/lib64\"" + echo + echo "#undef LINK_OS_NEW_DTAGS_SPEC" + echo "#define LINK_OS_NEW_DTAGS_SPEC" \ +@@ -4467,7 +4481,10 @@ + echo "#define MD_EXEC_PREFIX \"$at/bin/\"" + echo + echo "#undef MD_STARTFILE_PREFIX" +- echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \ ++ echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\"" ++ echo ++ echo "#undef MD_STARTFILE_PREFIX_1" ++ echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \ + > advance-toolchain.h + else + echo "Unknown advance-toolchain $with_advance_toolchain" +@@ -4676,8 +4693,11 @@ ;; i[34567]86-*-dragonfly* | x86_64-*-dragonfly*) ;; @@ -47911,6 +53814,27 @@ free (ok_langs); free (bad_lang); +Index: gcc/Makefile.in +=================================================================== +--- a/src/gcc/Makefile.in (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/Makefile.in (.../branches/gcc-8-branch) +@@ -1114,6 +1114,7 @@ + # Support for additional languages (other than C). + # C can be supported this way too (leave for later). + ++LANG_CONFIGUREFRAGS = @all_lang_configurefrags@ + LANG_MAKEFRAGS = @all_lang_makefrags@ + + # Used by gcc/jit/Make-lang.in +@@ -1877,7 +1878,7 @@ + # Really, really stupid make features, such as SUN's KEEP_STATE, may force + # a target to build even if it is up-to-date. So we must verify that + # config.status does not exist before failing. +-config.status: $(srcdir)/configure $(srcdir)/config.gcc ++config.status: $(srcdir)/configure $(srcdir)/config.gcc $(LANG_CONFIGUREFRAGS) + @if [ ! -f config.status ] ; then \ + echo You must configure gcc. Look at http://gcc.gnu.org/install/ for details.; \ + false; \ Index: gcc/tree-ssa-structalias.c =================================================================== --- a/src/gcc/tree-ssa-structalias.c (.../tags/gcc_8_3_0_release) @@ -48166,6 +54090,20 @@ bits, regno, regno, UINTVAL (align)); } if (cfun->machine->has_softstack) +Index: gcc/config/alpha/alpha.c +=================================================================== +--- a/src/gcc/config/alpha/alpha.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/alpha/alpha.c (.../branches/gcc-8-branch) +@@ -8835,6 +8835,9 @@ + case CODE_LABEL: + goto close_shadow; + ++ case DEBUG_INSN: ++ break; ++ + default: + gcc_unreachable (); + } Index: gcc/config/alpha/alpha.h =================================================================== --- a/src/gcc/config/alpha/alpha.h (.../tags/gcc_8_3_0_release) @@ -48568,25 +54506,167 @@ OB_DEF (s390_vec_store_len, s390_vec_store_len_s8,s390_vec_store_len_dbl,B_VX, BT_FN_VOID_OV4SI_VOIDPTR_UINT) OB_DEF_VAR (s390_vec_store_len_s8, s390_vstl, 0, 0, BT_OV_VOID_V16QI_SCHARPTR_UINT) +Index: gcc/config/sparc/sparc.md +=================================================================== +--- a/src/gcc/config/sparc/sparc.md (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/sparc/sparc.md (.../branches/gcc-8-branch) +@@ -1601,10 +1601,7 @@ + (clobber (reg:P O7_REG))] + "REGNO (operands[0]) == INTVAL (operands[3])" + { +- if (flag_delayed_branch) +- return "sethi\t%%hi(%a1-4), %0\n\tcall\t%a2\n\t add\t%0, %%lo(%a1+4), %0"; +- else +- return "sethi\t%%hi(%a1-8), %0\n\tadd\t%0, %%lo(%a1-4), %0\n\tcall\t%a2\n\t nop"; ++ return output_load_pcrel_sym (operands); + } + [(set (attr "type") (const_string "multi")) + (set (attr "length") +Index: gcc/config/sparc/sparc-protos.h +=================================================================== +--- a/src/gcc/config/sparc/sparc-protos.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/sparc/sparc-protos.h (.../branches/gcc-8-branch) +@@ -69,6 +69,7 @@ + extern void sparc_split_mem_reg (rtx, rtx, machine_mode); + extern int sparc_split_reg_reg_legitimate (rtx, rtx); + extern void sparc_split_reg_reg (rtx, rtx, machine_mode); ++extern const char *output_load_pcrel_sym (rtx *); + extern const char *output_ubranch (rtx, rtx_insn *); + extern const char *output_cbranch (rtx, rtx, int, int, int, rtx_insn *); + extern const char *output_return (rtx_insn *); Index: gcc/config/sparc/sparc.c =================================================================== --- a/src/gcc/config/sparc/sparc.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/sparc/sparc.c (.../branches/gcc-8-branch) -@@ -4203,6 +4203,13 @@ - static bool - sparc_cannot_force_const_mem (machine_mode mode, rtx x) +@@ -4238,10 +4238,12 @@ + } + + /* Global Offset Table support. */ ++static GTY(()) rtx got_symbol_rtx = NULL_RTX; ++static GTY(()) rtx got_register_rtx = NULL_RTX; + static GTY(()) rtx got_helper_rtx = NULL_RTX; +-static GTY(()) rtx got_register_rtx = NULL_RTX; +-static GTY(()) rtx got_symbol_rtx = NULL_RTX; + ++static GTY(()) bool got_helper_needed = false; ++ + /* Return the SYMBOL_REF for the Global Offset Table. */ + + static rtx +@@ -4253,27 +4255,6 @@ + return got_symbol_rtx; + } + +-#ifdef HAVE_GAS_HIDDEN +-# define USE_HIDDEN_LINKONCE 1 +-#else +-# define USE_HIDDEN_LINKONCE 0 +-#endif +- +-static void +-get_pc_thunk_name (char name[32], unsigned int regno) +-{ +- const char *reg_name = reg_names[regno]; +- +- /* Skip the leading '%' as that cannot be used in a +- symbol name. */ +- reg_name += 1; +- +- if (USE_HIDDEN_LINKONCE) +- sprintf (name, "__sparc_get_pc_thunk.%s", reg_name); +- else +- ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", regno); +-} +- + /* Wrapper around the load_pcrel_sym{si,di} patterns. */ + + static rtx +@@ -4293,30 +4274,78 @@ + return insn; + } + ++/* Output the load_pcrel_sym{si,di} patterns. */ ++ ++const char * ++output_load_pcrel_sym (rtx *operands) ++{ ++ if (flag_delayed_branch) ++ { ++ output_asm_insn ("sethi\t%%hi(%a1-4), %0", operands); ++ output_asm_insn ("call\t%a2", operands); ++ output_asm_insn (" add\t%0, %%lo(%a1+4), %0", operands); ++ } ++ else ++ { ++ output_asm_insn ("sethi\t%%hi(%a1-8), %0", operands); ++ output_asm_insn ("add\t%0, %%lo(%a1-4), %0", operands); ++ output_asm_insn ("call\t%a2", operands); ++ output_asm_insn (" nop", NULL); ++ } ++ ++ if (operands[2] == got_helper_rtx) ++ got_helper_needed = true; ++ ++ return ""; ++} ++ ++#ifdef HAVE_GAS_HIDDEN ++# define USE_HIDDEN_LINKONCE 1 ++#else ++# define USE_HIDDEN_LINKONCE 0 ++#endif ++ + /* Emit code to load the GOT register. */ + + void + load_got_register (void) { -+ /* After IRA has run in PIC mode, it is too late to put anything into the -+ constant pool if the PIC register hasn't already been initialized. */ -+ if ((lra_in_progress || reload_in_progress) -+ && flag_pic -+ && !crtl->uses_pic_offset_table) -+ return true; +- if (!got_register_rtx) +- got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM); ++ rtx insn; + + if (TARGET_VXWORKS_RTP) +- emit_insn (gen_vxworks_load_got ()); ++ { ++ if (!got_register_rtx) ++ got_register_rtx = pic_offset_table_rtx; + - switch (GET_CODE (x)) ++ insn = gen_vxworks_load_got (); ++ } + else { - case CONST_INT: -@@ -4452,7 +4459,7 @@ ++ if (!got_register_rtx) ++ got_register_rtx = gen_rtx_REG (Pmode, GLOBAL_OFFSET_TABLE_REGNUM); ++ + /* The GOT symbol is subject to a PC-relative relocation so we need a + helper function to add the PC value and thus get the final value. */ + if (!got_helper_rtx) + { + char name[32]; +- get_pc_thunk_name (name, GLOBAL_OFFSET_TABLE_REGNUM); ++ ++ /* Skip the leading '%' as that cannot be used in a symbol name. */ ++ if (USE_HIDDEN_LINKONCE) ++ sprintf (name, "__sparc_get_pc_thunk.%s", ++ reg_names[REGNO (got_register_rtx)] + 1); ++ else ++ ASM_GENERATE_INTERNAL_LABEL (name, "LADDPC", ++ REGNO (got_register_rtx)); ++ + got_helper_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name)); + } + +- emit_insn (gen_load_pcrel_sym (got_register_rtx, sparc_got (), +- got_helper_rtx)); ++ insn ++ = gen_load_pcrel_sym (got_register_rtx, sparc_got (), got_helper_rtx); + } ++ ++ emit_insn (insn); + } + + /* Ensure that we are not using patterns that are not OK with PIC. */ +@@ -4452,7 +4481,7 @@ return true; if (!HARD_REGISTER_P (pic_offset_table_rtx) @@ -48595,6 +54675,68 @@ && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx)) return true; +@@ -5468,7 +5497,7 @@ + return true; + + /* GOT register (%l7) if needed. */ +- if (regno == GLOBAL_OFFSET_TABLE_REGNUM && got_register_rtx) ++ if (got_register_rtx && regno == REGNO (got_register_rtx)) + return true; + + /* If the function accesses prior frames, the frame pointer and the return +@@ -12449,10 +12478,9 @@ + sparc_file_end (void) + { + /* If we need to emit the special GOT helper function, do so now. */ +- if (got_helper_rtx) ++ if (got_helper_needed) + { + const char *name = XSTR (got_helper_rtx, 0); +- const char *reg_name = reg_names[GLOBAL_OFFSET_TABLE_REGNUM]; + #ifdef DWARF2_UNWIND_INFO + bool do_cfi; + #endif +@@ -12489,17 +12517,22 @@ + #ifdef DWARF2_UNWIND_INFO + do_cfi = dwarf2out_do_cfi_asm (); + if (do_cfi) +- fprintf (asm_out_file, "\t.cfi_startproc\n"); ++ output_asm_insn (".cfi_startproc", NULL); + #endif + if (flag_delayed_branch) +- fprintf (asm_out_file, "\tjmp\t%%o7+8\n\t add\t%%o7, %s, %s\n", +- reg_name, reg_name); ++ { ++ output_asm_insn ("jmp\t%%o7+8", NULL); ++ output_asm_insn (" add\t%%o7, %0, %0", &got_register_rtx); ++ } + else +- fprintf (asm_out_file, "\tadd\t%%o7, %s, %s\n\tjmp\t%%o7+8\n\t nop\n", +- reg_name, reg_name); ++ { ++ output_asm_insn ("add\t%%o7, %0, %0", &got_register_rtx); ++ output_asm_insn ("jmp\t%%o7+8", NULL); ++ output_asm_insn (" nop", NULL); ++ } + #ifdef DWARF2_UNWIND_INFO + if (do_cfi) +- fprintf (asm_out_file, "\t.cfi_endproc\n"); ++ output_asm_insn (".cfi_endproc", NULL); + #endif + } + +@@ -13005,7 +13038,10 @@ + edge entry_edge; + rtx_insn *seq; + +- if (!crtl->uses_pic_offset_table) ++ /* In PIC mode, we need to always initialize the PIC register if optimization ++ is enabled, because we are called from IRA and LRA may later force things ++ to the constant pool for optimization purposes. */ ++ if (!flag_pic || (!crtl->uses_pic_offset_table && !optimize)) + return; + + start_sequence (); Index: gcc/config/sparc/sparc.h =================================================================== --- a/src/gcc/config/sparc/sparc.h (.../tags/gcc_8_3_0_release) @@ -48617,7 +54759,7 @@ =================================================================== --- a/src/gcc/config/darwin.opt (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/darwin.opt (.../branches/gcc-8-branch) -@@ -18,241 +18,379 @@ +@@ -18,241 +18,383 @@ ; along with GCC; see the file COPYING3. If not see ; . @@ -48684,6 +54826,10 @@ +Target RejectNegative Report Var(darwin_one_byte_bool) +Set sizeof(bool) to 1. + ++msymbol-stubs ++Target Report Var(darwin_symbol_stubs) Init(0) ++Force generation of external symbol indirection stubs. ++ +; Some code-gen may be improved / adjusted if the linker is sufficiently modern. +mtarget-linker= +Target RejectNegative Joined Report Alias(mtarget-linker) @@ -49097,7 +55243,7 @@ Zall_load Driver -@@ -343,62 +481,3 @@ +@@ -343,62 +485,3 @@ Zweak_reference_mismatches Driver Separate @@ -49298,6 +55444,19 @@ @@ -1,2 +0,0 @@ -MULTILIB_OPTIONS = m32 -MULTILIB_DIRNAMES = i386 +Index: gcc/config/i386/i386.h +=================================================================== +--- a/src/gcc/config/i386/i386.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/i386/i386.h (.../branches/gcc-8-branch) +@@ -621,7 +621,7 @@ + /* Replace MACH-O, ifdefs by in-line tests, where possible. + (a) Macros defined in config/i386/darwin.h */ + #define TARGET_MACHO 0 +-#define TARGET_MACHO_BRANCH_ISLANDS 0 ++#define TARGET_MACHO_SYMBOL_STUBS 0 + #define MACHOPIC_ATT_STUB 0 + /* (b) Macros defined in config/darwin.h */ + #define MACHO_DYNAMIC_NO_PIC_P 0 Index: gcc/config/i386/t-darwin64-biarch =================================================================== --- a/src/gcc/config/i386/t-darwin64-biarch (.../tags/gcc_8_3_0_release) @@ -49797,7 +55956,26 @@ shared-libgcc|fexceptions|fgnu-runtime: \ %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \ %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ -@@ -130,7 +131,8 @@ +@@ -88,14 +89,12 @@ + #undef WCHAR_TYPE_SIZE + #define WCHAR_TYPE_SIZE 32 + +-/* Generate branch islands stubs if this is true. */ +-extern int darwin_emit_branch_islands; ++/* Generate pic symbol indirection stubs if this is true. */ ++#undef TARGET_MACHO_SYMBOL_STUBS ++#define TARGET_MACHO_SYMBOL_STUBS (darwin_symbol_stubs) + +-#undef TARGET_MACHO_BRANCH_ISLANDS +-#define TARGET_MACHO_BRANCH_ISLANDS darwin_emit_branch_islands +- + /* For compatibility with OSX system tools, use the new style of pic stub +- if this is set. */ ++ if this is set (default). */ + #undef MACHOPIC_ATT_STUB + #define MACHOPIC_ATT_STUB (darwin_macho_att_stub) + +@@ -130,7 +129,8 @@ #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) \ %{!mkernel:%{!static:%{!mdynamic-no-pic:-fPIC}}} \ @@ -49807,7 +55985,7 @@ DARWIN_CC1_SPEC #undef ASM_SPEC -@@ -138,9 +140,6 @@ +@@ -138,9 +138,6 @@ " ASM_OPTIONS " -force_cpusubtype_ALL \ %{static}" ASM_MMACOSX_VERSION_MIN_SPEC @@ -49817,7 +55995,7 @@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ -@@ -148,12 +147,15 @@ +@@ -148,12 +145,15 @@ %{mpc64:crtprec64.o%s} \ %{mpc80:crtprec80.o%s}" TM_DESTRUCTOR @@ -49835,7 +56013,7 @@ /* The Darwin assembler mostly follows AT&T syntax. */ #undef ASSEMBLER_DIALECT -@@ -219,6 +221,23 @@ +@@ -219,19 +219,36 @@ } \ } while (0) @@ -49859,6 +56037,42 @@ /* Darwin profiling -- call mcount. */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ +- do { \ +- if (TARGET_MACHO_BRANCH_ISLANDS \ +- && MACHOPIC_INDIRECT && !TARGET_64BIT) \ +- { \ +- const char *name = machopic_mcount_stub_name (); \ +- fprintf (FILE, "\tcall %s\n", name+1); /* skip '&' */ \ +- machopic_validate_stub_or_non_lazy_ptr (name); \ +- } \ +- else fprintf (FILE, "\tcall mcount\n"); \ +- } while (0) ++ do { \ ++ if (TARGET_MACHO_SYMBOL_STUBS \ ++ && MACHOPIC_INDIRECT && !TARGET_64BIT) \ ++ { \ ++ const char *name = machopic_mcount_stub_name (); \ ++ fprintf (FILE, "\tcall %s\n", name+1); /* skip '&' */ \ ++ machopic_validate_stub_or_non_lazy_ptr (name); \ ++ } \ ++ else fprintf (FILE, "\tcall mcount\n"); \ ++ } while (0) + + #define C_COMMON_OVERRIDE_OPTIONS \ + do { \ +@@ -304,10 +321,8 @@ + } \ + } + +-/* This needs to move since i386 uses the first flag and other flags are +- used in Mach-O. */ +-#undef MACHO_SYMBOL_FLAG_VARIABLE +-#define MACHO_SYMBOL_FLAG_VARIABLE ((SYMBOL_FLAG_MACH_DEP) << 3) ++/* First available SYMBOL flag bit for use by subtargets. */ ++#define SYMBOL_FLAG_SUBT_DEP (SYMBOL_FLAG_MACH_DEP << 5) + + #undef MACHOPIC_NL_SYMBOL_PTR_SECTION + #define MACHOPIC_NL_SYMBOL_PTR_SECTION \ Index: gcc/config/i386/emmintrin.h =================================================================== --- a/src/gcc/config/i386/emmintrin.h (.../tags/gcc_8_3_0_release) @@ -49872,6 +56086,29 @@ } extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +Index: gcc/config/i386/intelmic-mkoffload.c +=================================================================== +--- a/src/gcc/config/i386/intelmic-mkoffload.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/i386/intelmic-mkoffload.c (.../branches/gcc-8-branch) +@@ -453,8 +453,6 @@ + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); + obstack_ptr_grow (&argv_obstack, "-xlto"); +- obstack_ptr_grow (&argv_obstack, "-shared"); +- obstack_ptr_grow (&argv_obstack, "-fPIC"); + obstack_ptr_grow (&argv_obstack, opt1); + for (int i = 1; i < argc; i++) + { +@@ -466,6 +464,9 @@ + if (!out_obj_filename) + fatal_error (input_location, "output file not specified"); + obstack_ptr_grow (&argv_obstack, opt2); ++ /* NB: Put -fPIC and -shared the last to create shared library. */ ++ obstack_ptr_grow (&argv_obstack, "-fPIC"); ++ obstack_ptr_grow (&argv_obstack, "-shared"); + obstack_ptr_grow (&argv_obstack, "-o"); + obstack_ptr_grow (&argv_obstack, target_so_filename); + compile_for_target (&argv_obstack); Index: gcc/config/i386/avxintrin.h =================================================================== --- a/src/gcc/config/i386/avxintrin.h (.../tags/gcc_8_3_0_release) @@ -50059,6 +56296,15 @@ replace_with_subreg_in_insn (insn, reg, reg); bitmap_clear_bit (conv, INSN_UID (insn)); +@@ -3488,7 +3380,7 @@ + | PTA_AVX512VBMI | PTA_AVX512IFMA | PTA_SHA; + const wide_int_bitmask PTA_ICELAKE_CLIENT = PTA_CANNONLAKE | PTA_AVX512VNNI + | PTA_GFNI | PTA_VAES | PTA_AVX512VBMI2 | PTA_VPCLMULQDQ | PTA_AVX512BITALG +- | PTA_RDPID | PTA_CLWB; ++ | PTA_RDPID | PTA_CLWB | PTA_AVX512VPOPCNTDQ; + const wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT | PTA_PCONFIG + | PTA_WBNOINVD; + const wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF | PTA_AVX512ER @@ -4958,6 +4850,12 @@ opts->x_param_values, opts_set->x_param_values); @@ -50072,7 +56318,64 @@ return true; } -@@ -18121,6 +18019,7 @@ +@@ -5552,7 +5450,25 @@ + ret = false; + } + else +- p_strings[opt] = xstrdup (p + opt_len); ++ { ++ p_strings[opt] = xstrdup (p + opt_len); ++ if (opt == IX86_FUNCTION_SPECIFIC_ARCH) ++ { ++ /* If arch= is set, clear all bits in x_ix86_isa_flags, ++ except for ISA_64BIT, ABI_64, ABI_X32, and CODE16 ++ and all bits in x_ix86_isa_flags2. */ ++ opts->x_ix86_isa_flags &= (OPTION_MASK_ISA_64BIT ++ | OPTION_MASK_ABI_64 ++ | OPTION_MASK_ABI_X32 ++ | OPTION_MASK_CODE16); ++ opts->x_ix86_isa_flags_explicit &= (OPTION_MASK_ISA_64BIT ++ | OPTION_MASK_ABI_64 ++ | OPTION_MASK_ABI_X32 ++ | OPTION_MASK_CODE16); ++ opts->x_ix86_isa_flags2 = 0; ++ opts->x_ix86_isa_flags2_explicit = 0; ++ } ++ } + } + + else if (type == ix86_opt_enum) +@@ -5627,18 +5543,8 @@ + /* If we are using the default tune= or arch=, undo the string assigned, + and use the default. */ + if (option_strings[IX86_FUNCTION_SPECIFIC_ARCH]) +- { +- opts->x_ix86_arch_string +- = ggc_strdup (option_strings[IX86_FUNCTION_SPECIFIC_ARCH]); +- +- /* If arch= is set, clear all bits in x_ix86_isa_flags, +- except for ISA_64BIT, ABI_64, ABI_X32, and CODE16. */ +- opts->x_ix86_isa_flags &= (OPTION_MASK_ISA_64BIT +- | OPTION_MASK_ABI_64 +- | OPTION_MASK_ABI_X32 +- | OPTION_MASK_CODE16); +- opts->x_ix86_isa_flags2 = 0; +- } ++ opts->x_ix86_arch_string ++ = ggc_strdup (option_strings[IX86_FUNCTION_SPECIFIC_ARCH]); + else if (!orig_arch_specified) + opts->x_ix86_arch_string = NULL; + +@@ -17313,7 +17219,7 @@ + break; + + case SYMBOL_REF: +- if (TARGET_64BIT || ! TARGET_MACHO_BRANCH_ISLANDS) ++ if (TARGET_64BIT || ! TARGET_MACHO_SYMBOL_STUBS) + output_addr_const (file, x); + else + { +@@ -18121,6 +18027,7 @@ ; -- print a semicolon (after prefixes due to bug in older gas). ~ -- print "i" if TARGET_AVX2, "f" otherwise. ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode @@ -50080,7 +56383,7 @@ ! -- print MPX prefix for jxx/call/ret instructions if required. */ -@@ -18668,6 +18567,26 @@ +@@ -18668,6 +18575,26 @@ putc (TARGET_AVX2 ? 'i' : 'f', file); return; @@ -50107,7 +56410,7 @@ case '^': if (TARGET_64BIT && Pmode != word_mode) fputs ("addr32 ", file); -@@ -24062,6 +23981,8 @@ +@@ -24062,6 +23989,8 @@ else { code = is_min ? SMIN : SMAX; @@ -50116,7 +56419,7 @@ tmp = gen_rtx_fmt_ee (code, mode, if_true, if_false); } -@@ -28757,6 +28678,25 @@ +@@ -28757,6 +28686,25 @@ return false; } @@ -50142,7 +56445,7 @@ /* Output indirect branch via a call and return thunk. CALL_OP is a register which contains the branch target. XASM is the assembly template for CALL_OP. Branch is a tail call if SIBCALL_P is true. -@@ -28798,25 +28738,17 @@ +@@ -28798,25 +28746,17 @@ thunk_name = NULL; if (sibcall_p) @@ -50173,7 +56476,7 @@ return; } -@@ -28840,15 +28772,7 @@ +@@ -28840,15 +28780,7 @@ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1); @@ -50190,7 +56493,7 @@ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2); -@@ -28913,15 +28837,7 @@ +@@ -28913,15 +28845,7 @@ if (sibcall_p) { output_asm_insn (push_buf, &call_op); @@ -50207,7 +56510,7 @@ } else { -@@ -28980,15 +28896,7 @@ +@@ -28980,15 +28904,7 @@ output_asm_insn (push_buf, &call_op); @@ -50224,7 +56527,7 @@ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2); -@@ -29057,13 +28965,15 @@ +@@ -29057,13 +28973,15 @@ if (need_prefix == indirect_thunk_prefix_bnd) { indirect_return_bnd_needed |= need_thunk; @@ -50242,7 +56545,7 @@ } else output_indirect_thunk (need_prefix, INVALID_REGNUM); -@@ -29104,7 +29014,7 @@ +@@ -29104,7 +29022,7 @@ indirect_return_via_cx_bnd = true; indirect_thunks_bnd_used |= 1 << CX_REG; } @@ -50251,7 +56554,7 @@ } else { -@@ -29113,8 +29023,10 @@ +@@ -29113,8 +29031,10 @@ indirect_return_via_cx = true; indirect_thunks_used |= 1 << CX_REG; } @@ -50263,7 +56566,7 @@ } else output_indirect_thunk (need_prefix, regno); -@@ -32923,6 +32835,7 @@ +@@ -32923,6 +32843,7 @@ } /* Build result decl and add to function_decl. */ t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node); @@ -50271,7 +56574,7 @@ DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; DECL_RESULT (decl) = t; -@@ -39641,7 +39554,7 @@ +@@ -39641,7 +39562,7 @@ static bool use_rsqrt_p () { @@ -50280,7 +56583,7 @@ && flag_finite_math_only && !flag_trapping_math && flag_unsafe_math_optimizations); -@@ -45705,8 +45618,10 @@ +@@ -45705,8 +45626,10 @@ x2 -= 1; Compensate. Ceil: if (x2 < x) @@ -50293,7 +56596,7 @@ */ machine_mode mode = GET_MODE (operand0); rtx xa, TWO52, tmp, one, res, mask; -@@ -45732,17 +45647,16 @@ +@@ -45732,17 +45655,16 @@ /* xa = copysign (xa, operand1) */ ix86_sse_copysign_to_positive (xa, xa, res, mask); @@ -50316,7 +56619,7 @@ emit_move_insn (res, tmp); emit_label (label); -@@ -46379,7 +46293,8 @@ +@@ -46379,7 +46301,8 @@ expand_vec_perm_blend (struct expand_vec_perm_d *d) { machine_mode mmode, vmode = d->vmode; @@ -50326,7 +56629,7 @@ rtx target, op0, op1, maskop, x; rtx rperm[32], vperm; -@@ -46433,7 +46348,7 @@ +@@ -46433,7 +46356,7 @@ case E_V16SImode: case E_V8DImode: for (i = 0; i < nelt; ++i) @@ -50335,7 +56638,7 @@ break; case E_V2DImode: -@@ -50999,7 +50914,7 @@ +@@ -50999,7 +50922,7 @@ there is no adddf3 pattern (since x87 floating point only has XFmode operations) so the default hook implementation gets this wrong. */ @@ -50344,7 +56647,7 @@ } /* Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV. */ -@@ -51007,7 +50922,7 @@ +@@ -51007,7 +50930,7 @@ static void ix86_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) { @@ -50353,7 +56656,7 @@ return; tree exceptions_var = create_tmp_var_raw (integer_type_node); if (TARGET_80387) -@@ -51042,7 +50957,7 @@ +@@ -51042,7 +50965,7 @@ tree update_fldenv = build_call_expr (fldenv, 1, fenv_addr); *update = build2 (COMPOUND_EXPR, void_type_node, *update, update_fldenv); } @@ -50362,7 +56665,7 @@ { tree mxcsr_orig_var = create_tmp_var_raw (unsigned_type_node); tree mxcsr_mod_var = create_tmp_var_raw (unsigned_type_node); -@@ -51399,7 +51314,7 @@ +@@ -51399,7 +51322,7 @@ return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; else if (!TARGET_MIX_SSE_I387) { @@ -50371,6 +56674,19 @@ return FLT_EVAL_METHOD_PROMOTE_TO_LONG_DOUBLE; else if (TARGET_SSE2) return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; +Index: gcc/config/darwin-protos.h +=================================================================== +--- a/src/gcc/config/darwin-protos.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/darwin-protos.h (.../branches/gcc-8-branch) +@@ -53,8 +53,6 @@ + + #endif /* TREE_CODE */ + +-extern void machopic_finish (FILE *); +- + extern int machopic_reloc_rw_mask (void); + extern section *machopic_select_section (tree, int, unsigned HOST_WIDE_INT); + Index: gcc/config/sh/sh.c =================================================================== --- a/src/gcc/config/sh/sh.c (.../tags/gcc_8_3_0_release) @@ -50384,7 +56700,23 @@ { std::string offset_str = tokens[i].substr (strlen ("gbr-offset=")); ret.tcb_gbr_offset = integral_argument (offset_str.c_str ()); -@@ -10875,12 +10875,6 @@ +@@ -957,11 +957,13 @@ + if (flag_unsafe_math_optimizations) + { + /* Enable fsca insn for SH4A if not otherwise specified by the user. */ +- if (global_options_set.x_TARGET_FSCA == 0 && TARGET_SH4A_FP) ++ if (global_options_set.x_TARGET_FSCA == 0 ++ && (TARGET_SH4A_FP || TARGET_FPU_SH4_300)) + TARGET_FSCA = 1; + + /* Enable fsrra insn for SH4A if not otherwise specified by the user. */ +- if (global_options_set.x_TARGET_FSRRA == 0 && TARGET_SH4A_FP) ++ if (global_options_set.x_TARGET_FSRRA == 0 ++ && (TARGET_SH4A_FP || TARGET_FPU_SH4_300)) + TARGET_FSRRA = 1; + } + +@@ -10875,12 +10877,6 @@ emit_insn (gen_add2_insn (scratch0, GEN_INT (vcall_offset))); offset_addr = scratch0; } @@ -50397,7 +56729,7 @@ else gcc_unreachable (); /* FIXME */ emit_load_ptr (scratch0, offset_addr); -@@ -12077,9 +12071,11 @@ +@@ -12077,9 +12073,11 @@ rtx r = gen_reg_rtx (SImode); rtx_insn* i0; if (from_mode == QImode) @@ -50411,6 +56743,214 @@ else gcc_unreachable (); +@@ -12497,7 +12495,7 @@ + sh_emit_mode_set (int entity ATTRIBUTE_UNUSED, int mode, + int prev_mode, HARD_REG_SET regs_live ATTRIBUTE_UNUSED) + { +- if ((TARGET_SH4A_FP || TARGET_SH4_300) ++ if ((TARGET_SH4A_FP || TARGET_FPU_SH4_300) + && prev_mode != FP_MODE_NONE && prev_mode != mode) + { + emit_insn (gen_toggle_pr ()); +Index: gcc/config/sh/sh.h +=================================================================== +--- a/src/gcc/config/sh/sh.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/sh/sh.h (.../branches/gcc-8-branch) +@@ -69,6 +69,8 @@ + FPU is disabled (which makes it compatible with SH4al-dsp). */ + #define TARGET_SH4A_FP (TARGET_SH4A && TARGET_FPU_ANY) + ++/* True if the FPU is a SH4-300 variant. */ ++#define TARGET_FPU_SH4_300 (TARGET_FPU_ANY && TARGET_SH4_300) + + /* This is not used by the SH2E calling convention */ + #define TARGET_VARARGS_PRETEND_ARGS(FUN_DECL) \ +Index: gcc/config/sh/sh.md +=================================================================== +--- a/src/gcc/config/sh/sh.md (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/sh/sh.md (.../branches/gcc-8-branch) +@@ -9163,7 +9163,7 @@ + (xor:SI (reg:SI FPSCR_REG) (const_int FPSCR_PR))) + (set (reg:SI FPSCR_MODES_REG) + (unspec_volatile:SI [(const_int 0)] UNSPECV_FPSCR_MODES))] +- "TARGET_SH4A_FP" ++ "TARGET_SH4A_FP || TARGET_FPU_SH4_300" + "fpchg" + [(set_attr "type" "fpscr_toggle")]) + +@@ -9391,15 +9391,31 @@ + (define_expand "negsf2" + [(set (match_operand:SF 0 "fp_arith_reg_operand") + (neg:SF (match_operand:SF 1 "fp_arith_reg_operand")))] +- "TARGET_SH2E") ++ "TARGET_FPU_ANY" ++{ ++ if (TARGET_FPU_SH4_300) ++ emit_insn (gen_negsf2_fpscr (operands[0], operands[1])); ++ else ++ emit_insn (gen_negsf2_no_fpscr (operands[0], operands[1])); ++ DONE; ++}) + +-(define_insn "*negsf2_i" ++(define_insn "negsf2_no_fpscr" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))] +- "TARGET_SH2E" ++ "TARGET_FPU_ANY && !TARGET_FPU_SH4_300" + "fneg %0" + [(set_attr "type" "fmove")]) + ++(define_insn "negsf2_fpscr" ++ [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") ++ (neg:SF (match_operand:SF 1 "fp_arith_reg_operand" "0"))) ++ (use (reg:SI FPSCR_MODES_REG))] ++ "TARGET_FPU_SH4_300" ++ "fneg %0" ++ [(set_attr "type" "fmove") ++ (set_attr "fp_mode" "single")]) ++ + (define_expand "sqrtsf2" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "") + (sqrt:SF (match_operand:SF 1 "fp_arith_reg_operand" "")))] +@@ -9489,15 +9505,31 @@ + (define_expand "abssf2" + [(set (match_operand:SF 0 "fp_arith_reg_operand") + (abs:SF (match_operand:SF 1 "fp_arith_reg_operand")))] +- "TARGET_SH2E") ++ "TARGET_FPU_ANY" ++{ ++ if (TARGET_FPU_SH4_300) ++ emit_insn (gen_abssf2_fpscr (operands[0], operands[1])); ++ else ++ emit_insn (gen_abssf2_no_fpscr (operands[0], operands[1])); ++ DONE; ++}) + +-(define_insn "*abssf2_i" ++(define_insn "abssf2_no_fpscr" + [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") + (abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "0")))] +- "TARGET_SH2E" ++ "TARGET_FPU_ANY && !TARGET_FPU_SH4_300" + "fabs %0" + [(set_attr "type" "fmove")]) + ++(define_insn "abssf2_fpscr" ++ [(set (match_operand:SF 0 "fp_arith_reg_operand" "=f") ++ (abs:SF (match_operand:SF 1 "fp_arith_reg_operand" "0"))) ++ (use (reg:SI FPSCR_MODES_REG))] ++ "TARGET_FPU_SH4_300" ++ "fabs %0" ++ [(set_attr "type" "fmove") ++ (set_attr "fp_mode" "single")]) ++ + (define_expand "adddf3" + [(set (match_operand:DF 0 "fp_arith_reg_operand" "") + (plus:DF (match_operand:DF 1 "fp_arith_reg_operand" "") +@@ -9673,12 +9705,28 @@ + (define_expand "negdf2" + [(set (match_operand:DF 0 "fp_arith_reg_operand") + (neg:DF (match_operand:DF 1 "fp_arith_reg_operand")))] +- "TARGET_FPU_DOUBLE") ++ "TARGET_FPU_DOUBLE" ++{ ++ if (TARGET_FPU_SH4_300) ++ emit_insn (gen_negdf2_fpscr (operands[0], operands[1])); ++ else ++ emit_insn (gen_negdf2_no_fpscr (operands[0], operands[1])); ++ DONE; ++}) + +-(define_insn "*negdf2_i" ++(define_insn "negdf2_fpscr" + [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") ++ (neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "0"))) ++ (use (reg:SI FPSCR_MODES_REG))] ++ "TARGET_FPU_SH4_300" ++ "fneg %0" ++ [(set_attr "type" "fmove") ++ (set_attr "fp_mode" "double")]) ++ ++(define_insn "negdf2_no_fpscr" ++ [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") + (neg:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))] +- "TARGET_FPU_DOUBLE" ++ "TARGET_FPU_DOUBLE && !TARGET_FPU_SH4_300" + "fneg %0" + [(set_attr "type" "fmove")]) + +@@ -9704,15 +9752,31 @@ + (define_expand "absdf2" + [(set (match_operand:DF 0 "fp_arith_reg_operand") + (abs:DF (match_operand:DF 1 "fp_arith_reg_operand")))] +- "TARGET_FPU_DOUBLE") ++ "TARGET_FPU_DOUBLE" ++{ ++ if (TARGET_FPU_SH4_300) ++ emit_insn (gen_absdf2_fpscr (operands[0], operands[1])); ++ else ++ emit_insn (gen_absdf2_no_fpscr (operands[0], operands[1])); ++ DONE; ++}) + +-(define_insn "*absdf2_i" ++(define_insn "absdf2_no_fpscr" + [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") + (abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "0")))] +- "TARGET_FPU_DOUBLE" ++ "TARGET_FPU_DOUBLE && !TARGET_FPU_SH4_300" + "fabs %0" + [(set_attr "type" "fmove")]) + ++(define_insn "absdf2_fpscr" ++ [(set (match_operand:DF 0 "fp_arith_reg_operand" "=f") ++ (abs:DF (match_operand:DF 1 "fp_arith_reg_operand" "0"))) ++ (use (reg:SI FPSCR_MODES_REG))] ++ "TARGET_FPU_SH4_300" ++ "fabs %0" ++ [(set_attr "type" "fmove") ++ (set_attr "fp_mode" "double")]) ++ + (define_expand "extendsfdf2" + [(set (match_operand:DF 0 "fp_arith_reg_operand" "") + (float_extend:DF (match_operand:SF 1 "fpul_operand" "")))] +Index: gcc/config/avr/avr.c +=================================================================== +--- a/src/gcc/config/avr/avr.c (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/avr/avr.c (.../branches/gcc-8-branch) +@@ -3797,13 +3797,14 @@ + gcc_unreachable(); + + case 1: +- return avr_asm_len ("%4lpm %0,%a2", xop, plen, 1); ++ avr_asm_len ("%4lpm %0,%a2", xop, plen, 1); ++ break; + + case 2: + if (REGNO (dest) == REG_Z) +- return avr_asm_len ("%4lpm %5,%a2+" CR_TAB +- "%4lpm %B0,%a2" CR_TAB +- "mov %A0,%5", xop, plen, 3); ++ avr_asm_len ("%4lpm %5,%a2+" CR_TAB ++ "%4lpm %B0,%a2" CR_TAB ++ "mov %A0,%5", xop, plen, 3); + else + { + avr_asm_len ("%4lpm %A0,%a2+" CR_TAB +@@ -3832,9 +3833,9 @@ + "%4lpm %B0,%a2+", xop, plen, 2); + + if (REGNO (dest) == REG_Z - 2) +- return avr_asm_len ("%4lpm %5,%a2+" CR_TAB +- "%4lpm %C0,%a2" CR_TAB +- "mov %D0,%5", xop, plen, 3); ++ avr_asm_len ("%4lpm %5,%a2+" CR_TAB ++ "%4lpm %C0,%a2" CR_TAB ++ "mov %D0,%5", xop, plen, 3); + else + { + avr_asm_len ("%4lpm %C0,%a2+" CR_TAB Index: gcc/config/xtensa/xtensa.c =================================================================== --- a/src/gcc/config/xtensa/xtensa.c (.../tags/gcc_8_3_0_release) @@ -50485,7 +57025,15 @@ { EXT_NAME, FLAG_CANONICAL, FEATURE_STRING }, static struct aarch64_arch_extension aarch64_extensions[] = { -@@ -249,19 +250,24 @@ +@@ -178,7 +179,6 @@ + unsigned int variants[2] = { ALL_VARIANTS, ALL_VARIANTS }; + unsigned int n_variants = 0; + bool processed_exts = false; +- const char *ext_string = ""; + unsigned long extension_flags = 0; + unsigned long default_flags = 0; + +@@ -249,19 +249,24 @@ { for (i = 0; i < num_exts; i++) { @@ -50519,7 +57067,7 @@ { /* Failed to match this token. Turn off the features we'd otherwise enable. */ -@@ -268,8 +274,11 @@ +@@ -268,8 +273,11 @@ enabled = false; break; } @@ -50532,7 +57080,24 @@ if (enabled) extension_flags |= aarch64_extensions[i].flag; -@@ -359,12 +368,12 @@ +@@ -348,23 +356,24 @@ + if (tune) + return res; + +- ext_string +- = aarch64_get_extension_string_for_isa_flags (extension_flags, +- default_flags).c_str (); ++ { ++ std::string extension ++ = aarch64_get_extension_string_for_isa_flags (extension_flags, ++ default_flags); ++ res = concat (res, extension.c_str (), NULL); ++ } + +- res = concat (res, ext_string, NULL); +- + return res; + not_found: { /* If detection fails we ignore the option. @@ -50909,6 +57474,49 @@ @@ -0,0 +1,2 @@ +MULTILIB_OPTIONS = m32 +MULTILIB_DIRNAMES = ppc +Index: gcc/config/rs6000/darwin.md +=================================================================== +--- a/src/gcc/config/rs6000/darwin.md (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/rs6000/darwin.md (.../branches/gcc-8-branch) +@@ -137,38 +137,6 @@ + [(set_attr "type" "store") + (set_attr "length" "4")]) + +-;; 64-bit MachO load/store support +-(define_insn "movdi_low" +- [(set (match_operand:DI 0 "gpc_reg_operand" "=r,*!d") +- (mem:DI (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,b") +- (match_operand 2 "" ""))))] +- "TARGET_MACHO && TARGET_64BIT" +- "@ +- ld %0,lo16(%2)(%1) +- lfd %0,lo16(%2)(%1)" +- [(set_attr "type" "load") +- (set_attr "length" "4")]) +- +-(define_insn "movsi_low_st" +- [(set (mem:SI (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") +- (match_operand 2 "" ""))) +- (match_operand:SI 0 "gpc_reg_operand" "r"))] +- "TARGET_MACHO && ! TARGET_64BIT" +- "stw %0,lo16(%2)(%1)" +- [(set_attr "type" "store") +- (set_attr "length" "4")]) +- +-(define_insn "movdi_low_st" +- [(set (mem:DI (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,b") +- (match_operand 2 "" ""))) +- (match_operand:DI 0 "gpc_reg_operand" "r,*!d"))] +- "TARGET_MACHO && TARGET_64BIT" +- "@ +- std %0,lo16(%2)(%1) +- stfd %0,lo16(%2)(%1)" +- [(set_attr "type" "store") +- (set_attr "length" "4")]) +- + ;; Mach-O PIC trickery. + (define_expand "macho_high" + [(set (match_operand 0 "") Index: gcc/config/rs6000/mmintrin.h =================================================================== --- a/src/gcc/config/rs6000/mmintrin.h (.../tags/gcc_8_3_0_release) @@ -50930,6 +57538,20 @@ +# 64-bit libraries can only be built in Darwin 8.x or later. +MULTILIB_OPTIONS = m64 +MULTILIB_DIRNAMES = ppc64 +Index: gcc/config/rs6000/predicates.md +=================================================================== +--- a/src/gcc/config/rs6000/predicates.md (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/rs6000/predicates.md (.../branches/gcc-8-branch) +@@ -1085,8 +1085,7 @@ + return 1; + + /* Allow any integer constant. */ +- if (GET_MODE_CLASS (mode) == MODE_INT +- && CONST_SCALAR_INT_P (op)) ++ if (SCALAR_INT_MODE_P (mode) && CONST_SCALAR_INT_P (op)) + return 1; + + /* Allow easy vector constants. */ Index: gcc/config/rs6000/power9.md =================================================================== --- a/src/gcc/config/rs6000/power9.md (.../tags/gcc_8_3_0_release) @@ -51058,6 +57680,133 @@ =================================================================== --- a/src/gcc/config/rs6000/rs6000-builtin.def (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/rs6000/rs6000-builtin.def (.../branches/gcc-8-branch) +@@ -1048,12 +1048,12 @@ + BU_ALTIVEC_2 (VADDSWS, "vaddsws", CONST, altivec_vaddsws) + BU_ALTIVEC_2 (VAND, "vand", CONST, andv4si3) + BU_ALTIVEC_2 (VANDC, "vandc", CONST, andcv4si3) +-BU_ALTIVEC_2 (VAVGUB, "vavgub", CONST, altivec_vavgub) +-BU_ALTIVEC_2 (VAVGSB, "vavgsb", CONST, altivec_vavgsb) +-BU_ALTIVEC_2 (VAVGUH, "vavguh", CONST, altivec_vavguh) +-BU_ALTIVEC_2 (VAVGSH, "vavgsh", CONST, altivec_vavgsh) +-BU_ALTIVEC_2 (VAVGUW, "vavguw", CONST, altivec_vavguw) +-BU_ALTIVEC_2 (VAVGSW, "vavgsw", CONST, altivec_vavgsw) ++BU_ALTIVEC_2 (VAVGUB, "vavgub", CONST, uavgv16qi3_ceil) ++BU_ALTIVEC_2 (VAVGSB, "vavgsb", CONST, avgv16qi3_ceil) ++BU_ALTIVEC_2 (VAVGUH, "vavguh", CONST, uavgv8hi3_ceil) ++BU_ALTIVEC_2 (VAVGSH, "vavgsh", CONST, avgv8hi3_ceil) ++BU_ALTIVEC_2 (VAVGUW, "vavguw", CONST, uavgv4si3_ceil) ++BU_ALTIVEC_2 (VAVGSW, "vavgsw", CONST, avgv4si3_ceil) + BU_ALTIVEC_2 (VCFUX, "vcfux", CONST, altivec_vcfux) + BU_ALTIVEC_2 (VCFSX, "vcfsx", CONST, altivec_vcfsx) + BU_ALTIVEC_2 (VCMPBFP, "vcmpbfp", CONST, altivec_vcmpbfp) +@@ -1223,26 +1223,26 @@ + BU_ALTIVEC_X (MFVSCR, "mfvscr", MISC) + BU_ALTIVEC_X (DSSALL, "dssall", MISC) + BU_ALTIVEC_X (DSS, "dss", MISC) +-BU_ALTIVEC_X (LVSL, "lvsl", MEM) +-BU_ALTIVEC_X (LVSR, "lvsr", MEM) +-BU_ALTIVEC_X (LVEBX, "lvebx", MEM) +-BU_ALTIVEC_X (LVEHX, "lvehx", MEM) +-BU_ALTIVEC_X (LVEWX, "lvewx", MEM) +-BU_ALTIVEC_X (LVXL, "lvxl", MEM) +-BU_ALTIVEC_X (LVXL_V2DF, "lvxl_v2df", MEM) +-BU_ALTIVEC_X (LVXL_V2DI, "lvxl_v2di", MEM) +-BU_ALTIVEC_X (LVXL_V4SF, "lvxl_v4sf", MEM) +-BU_ALTIVEC_X (LVXL_V4SI, "lvxl_v4si", MEM) +-BU_ALTIVEC_X (LVXL_V8HI, "lvxl_v8hi", MEM) +-BU_ALTIVEC_X (LVXL_V16QI, "lvxl_v16qi", MEM) +-BU_ALTIVEC_X (LVX, "lvx", MEM) +-BU_ALTIVEC_X (LVX_V1TI, "lvx_v1ti", MEM) +-BU_ALTIVEC_X (LVX_V2DF, "lvx_v2df", MEM) +-BU_ALTIVEC_X (LVX_V2DI, "lvx_v2di", MEM) +-BU_ALTIVEC_X (LVX_V4SF, "lvx_v4sf", MEM) +-BU_ALTIVEC_X (LVX_V4SI, "lvx_v4si", MEM) +-BU_ALTIVEC_X (LVX_V8HI, "lvx_v8hi", MEM) +-BU_ALTIVEC_X (LVX_V16QI, "lvx_v16qi", MEM) ++BU_ALTIVEC_X (LVSL, "lvsl", PURE) ++BU_ALTIVEC_X (LVSR, "lvsr", PURE) ++BU_ALTIVEC_X (LVEBX, "lvebx", PURE) ++BU_ALTIVEC_X (LVEHX, "lvehx", PURE) ++BU_ALTIVEC_X (LVEWX, "lvewx", PURE) ++BU_ALTIVEC_X (LVXL, "lvxl", PURE) ++BU_ALTIVEC_X (LVXL_V2DF, "lvxl_v2df", PURE) ++BU_ALTIVEC_X (LVXL_V2DI, "lvxl_v2di", PURE) ++BU_ALTIVEC_X (LVXL_V4SF, "lvxl_v4sf", PURE) ++BU_ALTIVEC_X (LVXL_V4SI, "lvxl_v4si", PURE) ++BU_ALTIVEC_X (LVXL_V8HI, "lvxl_v8hi", PURE) ++BU_ALTIVEC_X (LVXL_V16QI, "lvxl_v16qi", PURE) ++BU_ALTIVEC_X (LVX, "lvx", PURE) ++BU_ALTIVEC_X (LVX_V1TI, "lvx_v1ti", PURE) ++BU_ALTIVEC_X (LVX_V2DF, "lvx_v2df", PURE) ++BU_ALTIVEC_X (LVX_V2DI, "lvx_v2di", PURE) ++BU_ALTIVEC_X (LVX_V4SF, "lvx_v4sf", PURE) ++BU_ALTIVEC_X (LVX_V4SI, "lvx_v4si", PURE) ++BU_ALTIVEC_X (LVX_V8HI, "lvx_v8hi", PURE) ++BU_ALTIVEC_X (LVX_V16QI, "lvx_v16qi", PURE) + BU_ALTIVEC_X (STVX, "stvx", MEM) + BU_ALTIVEC_X (STVX_V2DF, "stvx_v2df", MEM) + BU_ALTIVEC_X (STVX_V2DI, "stvx_v2di", MEM) +@@ -1250,10 +1250,10 @@ + BU_ALTIVEC_X (STVX_V4SI, "stvx_v4si", MEM) + BU_ALTIVEC_X (STVX_V8HI, "stvx_v8hi", MEM) + BU_ALTIVEC_X (STVX_V16QI, "stvx_v16qi", MEM) +-BU_ALTIVEC_C (LVLX, "lvlx", MEM) +-BU_ALTIVEC_C (LVLXL, "lvlxl", MEM) +-BU_ALTIVEC_C (LVRX, "lvrx", MEM) +-BU_ALTIVEC_C (LVRXL, "lvrxl", MEM) ++BU_ALTIVEC_C (LVLX, "lvlx", PURE) ++BU_ALTIVEC_C (LVLXL, "lvlxl", PURE) ++BU_ALTIVEC_C (LVRX, "lvrx", PURE) ++BU_ALTIVEC_C (LVRXL, "lvrxl", PURE) + BU_ALTIVEC_X (STVEBX, "stvebx", MEM) + BU_ALTIVEC_X (STVEHX, "stvehx", MEM) + BU_ALTIVEC_X (STVEWX, "stvewx", MEM) +@@ -1764,15 +1764,15 @@ + BU_VSX_P (XVCMPGTDP_P, "xvcmpgtdp_p", CONST, vector_gt_v2df_p) + + /* VSX builtins that are handled as special cases. */ +-BU_VSX_X (LXSDX, "lxsdx", MEM) +-BU_VSX_X (LXVD2X_V1TI, "lxvd2x_v1ti", MEM) +-BU_VSX_X (LXVD2X_V2DF, "lxvd2x_v2df", MEM) +-BU_VSX_X (LXVD2X_V2DI, "lxvd2x_v2di", MEM) +-BU_VSX_X (LXVDSX, "lxvdsx", MEM) +-BU_VSX_X (LXVW4X_V4SF, "lxvw4x_v4sf", MEM) +-BU_VSX_X (LXVW4X_V4SI, "lxvw4x_v4si", MEM) +-BU_VSX_X (LXVW4X_V8HI, "lxvw4x_v8hi", MEM) +-BU_VSX_X (LXVW4X_V16QI, "lxvw4x_v16qi", MEM) ++BU_VSX_X (LXSDX, "lxsdx", PURE) ++BU_VSX_X (LXVD2X_V1TI, "lxvd2x_v1ti", PURE) ++BU_VSX_X (LXVD2X_V2DF, "lxvd2x_v2df", PURE) ++BU_VSX_X (LXVD2X_V2DI, "lxvd2x_v2di", PURE) ++BU_VSX_X (LXVDSX, "lxvdsx", PURE) ++BU_VSX_X (LXVW4X_V4SF, "lxvw4x_v4sf", PURE) ++BU_VSX_X (LXVW4X_V4SI, "lxvw4x_v4si", PURE) ++BU_VSX_X (LXVW4X_V8HI, "lxvw4x_v8hi", PURE) ++BU_VSX_X (LXVW4X_V16QI, "lxvw4x_v16qi", PURE) + BU_VSX_X (STXSDX, "stxsdx", MEM) + BU_VSX_X (STXVD2X_V1TI, "stxvd2x_v1ti", MEM) + BU_VSX_X (STXVD2X_V2DF, "stxvd2x_v2df", MEM) +@@ -1781,13 +1781,13 @@ + BU_VSX_X (STXVW4X_V4SI, "stxvw4x_v4si", MEM) + BU_VSX_X (STXVW4X_V8HI, "stxvw4x_v8hi", MEM) + BU_VSX_X (STXVW4X_V16QI, "stxvw4x_v16qi", MEM) +-BU_VSX_X (LD_ELEMREV_V1TI, "ld_elemrev_v1ti", MEM) +-BU_VSX_X (LD_ELEMREV_V2DF, "ld_elemrev_v2df", MEM) +-BU_VSX_X (LD_ELEMREV_V2DI, "ld_elemrev_v2di", MEM) +-BU_VSX_X (LD_ELEMREV_V4SF, "ld_elemrev_v4sf", MEM) +-BU_VSX_X (LD_ELEMREV_V4SI, "ld_elemrev_v4si", MEM) +-BU_VSX_X (LD_ELEMREV_V8HI, "ld_elemrev_v8hi", MEM) +-BU_VSX_X (LD_ELEMREV_V16QI, "ld_elemrev_v16qi", MEM) ++BU_VSX_X (LD_ELEMREV_V1TI, "ld_elemrev_v1ti", PURE) ++BU_VSX_X (LD_ELEMREV_V2DF, "ld_elemrev_v2df", PURE) ++BU_VSX_X (LD_ELEMREV_V2DI, "ld_elemrev_v2di", PURE) ++BU_VSX_X (LD_ELEMREV_V4SF, "ld_elemrev_v4sf", PURE) ++BU_VSX_X (LD_ELEMREV_V4SI, "ld_elemrev_v4si", PURE) ++BU_VSX_X (LD_ELEMREV_V8HI, "ld_elemrev_v8hi", PURE) ++BU_VSX_X (LD_ELEMREV_V16QI, "ld_elemrev_v16qi", PURE) + BU_VSX_X (ST_ELEMREV_V1TI, "st_elemrev_v1ti", MEM) + BU_VSX_X (ST_ELEMREV_V2DF, "st_elemrev_v2df", MEM) + BU_VSX_X (ST_ELEMREV_V2DI, "st_elemrev_v2di", MEM) @@ -2442,13 +2442,22 @@ BU_P9_OVERLOAD_2 (CMPEQB, "byte_in_set") @@ -51194,7 +57943,7 @@ =================================================================== --- a/src/gcc/config/rs6000/darwin.h (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/rs6000/darwin.h (.../branches/gcc-8-branch) -@@ -53,9 +53,23 @@ +@@ -53,17 +53,28 @@ #define TARGET_OS_CPP_BUILTINS() \ do \ { \ @@ -51220,7 +57969,15 @@ builtin_define ("__NATURAL_ALIGNMENT__"); \ darwin_cpp_builtins (pfile); \ } \ -@@ -98,11 +112,10 @@ + while (0) + +-/* Generate branch islands stubs if this is true. */ +-extern int darwin_emit_branch_islands; +- + #define SUBTARGET_OVERRIDE_OPTIONS darwin_rs6000_override_options () + + #define C_COMMON_OVERRIDE_OPTIONS do { \ +@@ -98,11 +109,10 @@ % 10.5 mmacosx-version-min= -lcrt1.o) \ ++ %:version-compare(>< 10.5 10.7 mmacosx-version-min= -lcrt1.10.5.o) \ ++ %{fgnu-tm: -lcrttms.o}" ++ ++/* crt2.o is at least partially required for 10.3.x and earlier. ++ It deals with registration of the unwind frames, where this is not ++ automatically provided by the system. So we need it for any case that ++ might use exceptions. */ ++#undef DARWIN_CRT2_SPEC #define DARWIN_CRT2_SPEC \ +- "%{!m64:%:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s)}" ++"%{!m64:%{shared-libgcc|static-libstdc++|fexceptions|fobjc-exceptions|fgnu-runtime: \ ++ %:version-compare(!> 10.4 mmacosx-version-min= crt2.o%s) \ ++ }}" + ++/* crt3 deals with providing cxa_atexit on earlier systems (or fixing it up, ++ for broken versions). It's only needed for c++ code, so we can make it ++ conditional on shared-libgcc since that's forced on for c++. */ ++#undef DARWIN_CRT3_SPEC ++#define DARWIN_CRT3_SPEC \ ++"%{!m64:%{shared-libgcc|static-libstdc++: \ ++ %:version-compare(>< 10.4 10.5 mmacosx-version-min= crt3.o%s) \ ++ %:version-compare(!> 10.4 mmacosx-version-min= crt3_2.o%s) \ ++ }}" ++ ++/* The PPC regs save/restore functions are leaves and could, conceivably ++ be used by the tm destructor. */ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC TM_DESTRUCTOR " -lef_ppc" ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + DARWIN_EXTRA_SPECS \ +@@ -265,9 +303,9 @@ + /* This is supported in cctools 465 and later. The macro test + above prevents using it in earlier build environments. */ + #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ +- if ((LOG) != 0) \ ++ if ((LOG) > 0) \ + { \ +- if ((MAX_SKIP) == 0) \ ++ if ((MAX_SKIP) <= 0) \ + fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ + else \ + fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ +@@ -382,6 +420,7 @@ + do \ + { \ + DARWIN_REGISTER_TARGET_PRAGMAS(); \ ++ targetm.target_option.pragma_parse = rs6000_pragma_target_parse; \ + targetm.resolve_overloaded_builtin = altivec_resolve_overloaded_builtin; \ + } \ + while (0) +@@ -441,6 +480,9 @@ + this will need to be modified similar to the x86 case. */ + #define TARGET_FOLD_BUILTIN SUBTARGET_FOLD_BUILTIN + ++/* First available SYMBOL flag bit for use by subtargets. */ ++#define SYMBOL_FLAG_SUBT_DEP (SYMBOL_FLAG_MACH_DEP) ++ + /* Use standard DWARF numbering for DWARF debugging information. */ + #define RS6000_USE_DWARF_NUMBERING + Index: gcc/config/rs6000/rs6000.c =================================================================== --- a/src/gcc/config/rs6000/rs6000.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/rs6000/rs6000.c (.../branches/gcc-8-branch) -@@ -3880,6 +3880,15 @@ +@@ -3880,10 +3880,22 @@ rs6000_isa_flags |= OPTION_MASK_POWERPC64; warning (0, "%qs requires PowerPC64 architecture, enabling", "-m64"); } @@ -51263,7 +58085,15 @@ if (flag_mkernel) { rs6000_default_long_calls = 1; -@@ -7374,7 +7383,6 @@ +- rs6000_isa_flags |= OPTION_MASK_SOFT_FLOAT; ++ ++ /* Allow a kext author to do -mkernel -mhard-float. */ ++ if (! (rs6000_isa_flags_explicit & OPTION_MASK_SOFT_FLOAT)) ++ rs6000_isa_flags |= OPTION_MASK_SOFT_FLOAT; + } + + /* Make -m64 imply -maltivec. Darwin's 64-bit ABI includes +@@ -7374,7 +7386,6 @@ default: break; case E_V1TImode: @@ -51271,7 +58101,7 @@ emit_move_insn (target, gen_lowpart (TImode, vec)); break; case E_V2DFmode: -@@ -7425,6 +7433,10 @@ +@@ -7425,6 +7436,10 @@ switch (mode) { @@ -51282,7 +58112,7 @@ case E_V2DFmode: emit_insn (gen_vsx_extract_v2df_var (target, vec, elt)); return; -@@ -7454,18 +7466,32 @@ +@@ -7454,18 +7469,32 @@ } } @@ -51321,7 +58151,7 @@ } /* Helper function to return the register number of a RTX. */ -@@ -7646,7 +7672,7 @@ +@@ -7646,7 +7675,7 @@ rtx tmp_altivec) { machine_mode mode = GET_MODE (src); @@ -51330,7 +58160,7 @@ unsigned scalar_size = GET_MODE_SIZE (scalar_mode); int byte_shift = exact_log2 (scalar_size); -@@ -7657,6 +7683,10 @@ +@@ -7657,6 +7686,10 @@ systems. */ if (MEM_P (src)) { @@ -51341,7 +58171,7 @@ gcc_assert (REG_P (tmp_gpr)); emit_move_insn (dest, rs6000_adjust_vec_address (dest, src, element, tmp_gpr, scalar_mode)); -@@ -7665,7 +7695,9 @@ +@@ -7665,7 +7698,9 @@ else if (REG_P (src) || SUBREG_P (src)) { @@ -51352,7 +58182,7 @@ rtx element2; int dest_regno = regno_or_subregno (dest); int src_regno = regno_or_subregno (src); -@@ -7741,7 +7773,7 @@ +@@ -7741,7 +7776,7 @@ { if (!VECTOR_ELT_ORDER_BIG) { @@ -51361,7 +58191,7 @@ emit_insn (gen_anddi3 (tmp_gpr, element, num_ele_m1)); emit_insn (gen_subdi3 (tmp_gpr, num_ele_m1, tmp_gpr)); -@@ -7799,8 +7831,8 @@ +@@ -7799,8 +7834,8 @@ emit_insn (gen_vsx_vslo_v2di (tmp_altivec_di, src_v2di, tmp_altivec)); emit_move_insn (tmp_gpr_di, tmp_altivec_di); @@ -51372,7 +58202,124 @@ return; } -@@ -12592,7 +12624,9 @@ +@@ -8223,6 +8258,101 @@ + return NULL_RTX; + } + ++/* This tests that a lo_sum {constant, symbol, symbol+offset} is valid for ++ the mode. If we can't find (or don't know) the alignment of the symbol ++ we assume (optimistically) that it's sufficiently aligned [??? maybe we ++ should be pessimistic]. Offsets are validated in the same way as for ++ reg + offset. */ ++static bool ++darwin_rs6000_legitimate_lo_sum_const_p (rtx x, machine_mode mode) ++{ ++ if (GET_CODE (x) == CONST) ++ x = XEXP (x, 0); ++ ++ if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_MACHOPIC_OFFSET) ++ x = XVECEXP (x, 0, 0); ++ ++ rtx sym = NULL_RTX; ++ unsigned HOST_WIDE_INT offset = 0; ++ ++ if (GET_CODE (x) == PLUS) ++ { ++ sym = XEXP (x, 0); ++ if (! SYMBOL_REF_P (sym)) ++ return false; ++ if (!CONST_INT_P (XEXP (x, 1))) ++ return false; ++ offset = INTVAL (XEXP (x, 1)); ++ } ++ else if (SYMBOL_REF_P (x)) ++ sym = x; ++ else if (CONST_INT_P (x)) ++ offset = INTVAL (x); ++ else if (GET_CODE (x) == LABEL_REF) ++ offset = 0; // We assume code labels are Pmode aligned ++ else ++ return false; // not sure what we have here. ++ ++ /* If we don't know the alignment of the thing to which the symbol refers, ++ we assume optimistically it is "enough". ++ ??? maybe we should be pessimistic instead. */ ++ unsigned align = 0; ++ ++ if (sym) ++ { ++ tree decl = SYMBOL_REF_DECL (sym); ++#if TARGET_MACHO ++ if (MACHO_SYMBOL_INDIRECTION_P (sym)) ++ /* The decl in an indirection symbol is the original one, which might ++ be less aligned than the indirection. Our indirections are always ++ pointer-aligned. */ ++ ; ++ else ++#endif ++ if (decl && DECL_ALIGN (decl)) ++ align = DECL_ALIGN_UNIT (decl); ++ } ++ ++ unsigned int extra = 0; ++ switch (mode) ++ { ++ case E_DFmode: ++ case E_DDmode: ++ case E_DImode: ++ /* If we are using VSX scalar loads, restrict ourselves to reg+reg ++ addressing. */ ++ if (VECTOR_MEM_VSX_P (mode)) ++ return false; ++ ++ if (!TARGET_POWERPC64) ++ extra = 4; ++ else if ((offset & 3) || (align & 3)) ++ return false; ++ break; ++ ++ case E_TFmode: ++ case E_IFmode: ++ case E_KFmode: ++ case E_TDmode: ++ case E_TImode: ++ case E_PTImode: ++ extra = 8; ++ if (!TARGET_POWERPC64) ++ extra = 12; ++ else if ((offset & 3) || (align & 3)) ++ return false; ++ break; ++ ++ default: ++ break; ++ } ++ ++ /* We only care if the access(es) would cause a change to the high part. */ ++ offset = ((offset & 0xffff) ^ 0x8000) - 0x8000; ++ return IN_RANGE (offset, -(HOST_WIDE_INT_1 << 15), ++ (HOST_WIDE_INT_1 << 15) - 1 - extra); ++} ++ + /* Return true if the MEM operand is a memory operand suitable for use + with a (full width, possibly multiple) gpr load/store. On + powerpc64 this means the offset must be divisible by 4. +@@ -8257,7 +8387,13 @@ + && legitimate_indirect_address_p (XEXP (addr, 0), false)) + return true; + +- /* Don't allow non-offsettable addresses. See PRs 83969 and 84279. */ ++ /* We need to look through Mach-O PIC unspecs to determine if a lo_sum is ++ really OK. Doing this early avoids teaching all the other machinery ++ about them. */ ++ if (TARGET_MACHO && GET_CODE (addr) == LO_SUM) ++ return darwin_rs6000_legitimate_lo_sum_const_p (XEXP (addr, 1), mode); ++ ++ /* Only allow offsettable addresses. See PRs 83969 and 84279. */ + if (!rs6000_offsettable_memref_p (op, mode, false)) + return false; + +@@ -12592,7 +12728,9 @@ if (elt_mode == TDmode && (cum->fregno % 2) == 1) cum->fregno++; @@ -51383,7 +58330,7 @@ { rtx rvec[GP_ARG_NUM_REG + AGGR_ARG_NUM_REG + 1]; rtx r, off; -@@ -12728,7 +12762,9 @@ +@@ -12728,7 +12866,9 @@ align_words = rs6000_parm_start (mode, type, cum->words); @@ -51394,7 +58341,7 @@ { unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3; -@@ -15417,9 +15453,17 @@ +@@ -15417,9 +15557,17 @@ op0 = expand_normal (arg0); op1 = expand_normal (arg1); @@ -51414,7 +58361,7 @@ tmode = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0))); mode0 = TYPE_MODE (TREE_TYPE (arg0)); -@@ -16765,15 +16809,6 @@ +@@ -16765,15 +16913,6 @@ case ALTIVEC_BUILTIN_VSPLTISH: case ALTIVEC_BUILTIN_VSPLTISW: { @@ -51430,7 +58377,7 @@ arg0 = gimple_call_arg (stmt, 0); lhs = gimple_call_lhs (stmt); -@@ -16780,8 +16815,7 @@ +@@ -16780,8 +16919,7 @@ /* Only fold the vec_splat_*() if the lower bits of arg 0 is a 5-bit signed constant in range -16 to +15. */ if (TREE_CODE (arg0) != INTEGER_CST @@ -51440,7 +58387,7 @@ return false; gimple_seq stmts = NULL; location_t loc = gimple_location (stmt); -@@ -18261,6 +18295,7 @@ +@@ -18261,6 +18399,7 @@ { /* unsigned 1 argument functions. */ case CRYPTO_BUILTIN_VSBOX: @@ -51448,7 +58395,7 @@ case P8V_BUILTIN_VGBBD: case MISC_BUILTIN_CDTBCD: case MISC_BUILTIN_CBCDTD: -@@ -18276,9 +18311,13 @@ +@@ -18276,9 +18415,13 @@ case ALTIVEC_BUILTIN_VMULOUH: case P8V_BUILTIN_VMULOUW: case CRYPTO_BUILTIN_VCIPHER: @@ -51462,7 +58409,44 @@ case CRYPTO_BUILTIN_VPMSUMB: case CRYPTO_BUILTIN_VPMSUMH: case CRYPTO_BUILTIN_VPMSUMW: -@@ -34192,6 +34231,10 @@ +@@ -21883,7 +22026,7 @@ + { + const char *name = XSTR (x, 0); + #if TARGET_MACHO +- if (darwin_emit_branch_islands ++ if (darwin_symbol_stubs + && MACHOPIC_INDIRECT + && machopic_classify_symbol (x) == MACHOPIC_UNDEFINED_FUNCTION) + name = machopic_indirection_name (x, /*stub_p=*/true); +@@ -25996,10 +26139,14 @@ + stack_limit_rtx, + GEN_INT (size))); + +- emit_insn (gen_elf_high (tmp_reg, toload)); +- emit_insn (gen_elf_low (tmp_reg, tmp_reg, toload)); +- emit_insn (gen_cond_trap (LTU, stack_reg, tmp_reg, +- const0_rtx)); ++ /* We cannot use r0 with elf_low. Lamely solve this problem by ++ moving registers around. */ ++ rtx r11_reg = gen_rtx_REG (Pmode, 11); ++ emit_move_insn (tmp_reg, r11_reg); ++ emit_insn (gen_elf_high (r11_reg, toload)); ++ emit_insn (gen_elf_low (r11_reg, r11_reg, toload)); ++ emit_insn (gen_cond_trap (LTU, stack_reg, r11_reg, const0_rtx)); ++ emit_move_insn (r11_reg, tmp_reg); + } + else + warning (0, "stack limit expression is not supported"); +@@ -33632,7 +33779,7 @@ + int cookie_operand_number) + { + static char buf[256]; +- if (darwin_emit_branch_islands ++ if (darwin_symbol_stubs + && GET_CODE (operands[dest_operand_number]) == SYMBOL_REF + && (INTVAL (operands[cookie_operand_number]) & CALL_LONG)) + { +@@ -34192,6 +34339,10 @@ rs6000_xcoff_output_readwrite_section_asm_op, &xcoff_private_data_section_name); @@ -51473,7 +58457,7 @@ tls_data_section = get_unnamed_section (SECTION_TLS, rs6000_xcoff_output_tls_section_asm_op, -@@ -34202,10 +34245,6 @@ +@@ -34202,10 +34353,6 @@ rs6000_xcoff_output_tls_section_asm_op, &xcoff_private_data_section_name); @@ -51484,7 +58468,7 @@ toc_section = get_unnamed_section (0, rs6000_xcoff_output_toc_section_asm_op, NULL); -@@ -34386,6 +34425,8 @@ +@@ -34386,6 +34533,8 @@ main_input_filename, ".bss_"); rs6000_gen_section_name (&xcoff_private_data_section_name, main_input_filename, ".rw_"); @@ -51493,7 +58477,7 @@ rs6000_gen_section_name (&xcoff_read_only_section_name, main_input_filename, ".ro_"); rs6000_gen_section_name (&xcoff_tls_data_section_name, -@@ -36605,11 +36646,21 @@ +@@ -36605,11 +36754,21 @@ unsigned int rs6000_dbx_register_number (unsigned int regno, unsigned int format) { @@ -51518,7 +58502,7 @@ /* On some platforms, we use the standard DWARF register numbering for .debug_info and .debug_frame. */ #ifdef RS6000_USE_DWARF_NUMBERING -@@ -36635,6 +36686,12 @@ +@@ -36635,6 +36794,12 @@ return 356; if (regno == VSCR_REGNO) return 67; @@ -51531,7 +58515,7 @@ #endif return regno; } -@@ -37840,6 +37897,7 @@ +@@ -37840,6 +38005,7 @@ /* Build result decl and add to function_decl. */ tree t = build_decl (UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE, ptr_type_node); @@ -51539,6 +58523,50 @@ DECL_ARTIFICIAL (t) = 1; DECL_IGNORED_P (t) = 1; DECL_RESULT (decl) = t; +@@ -38061,25 +38227,31 @@ + tree caller_tree = DECL_FUNCTION_SPECIFIC_TARGET (caller); + tree callee_tree = DECL_FUNCTION_SPECIFIC_TARGET (callee); + +- /* If callee has no option attributes, then it is ok to inline. */ ++ /* If the callee has no option attributes, then it is ok to inline. */ + if (!callee_tree) + ret = true; + +- /* If caller has no option attributes, but callee does then it is not ok to +- inline. */ +- else if (!caller_tree) +- ret = false; +- + else + { +- struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree); ++ HOST_WIDE_INT caller_isa; + struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree); ++ HOST_WIDE_INT callee_isa = callee_opts->x_rs6000_isa_flags; ++ HOST_WIDE_INT explicit_isa = callee_opts->x_rs6000_isa_flags_explicit; + +- /* Callee's options should a subset of the caller's, i.e. a vsx function +- can inline an altivec function but a non-vsx function can't inline a +- vsx function. */ +- if ((caller_opts->x_rs6000_isa_flags & callee_opts->x_rs6000_isa_flags) +- == callee_opts->x_rs6000_isa_flags) ++ /* If the caller has option attributes, then use them. ++ Otherwise, use the command line options. */ ++ if (caller_tree) ++ caller_isa = TREE_TARGET_OPTION (caller_tree)->x_rs6000_isa_flags; ++ else ++ caller_isa = rs6000_isa_flags; ++ ++ /* The callee's options must be a subset of the caller's options, i.e. ++ a vsx function may inline an altivec function, but a no-vsx function ++ must not inline a vsx function. However, for those options that the ++ callee has explicitly enabled or disabled, then we must enforce that ++ the callee's and caller's options match exactly; see PR70010. */ ++ if (((caller_isa & callee_isa) == callee_isa) ++ && (caller_isa & explicit_isa) == (callee_isa & explicit_isa)) + ret = true; + } + Index: gcc/config/rs6000/vsx.md =================================================================== --- a/src/gcc/config/rs6000/vsx.md (.../tags/gcc_8_3_0_release) @@ -51589,6 +58617,24 @@ UNSPEC_VRLMI UNSPEC_VRLNM ]) +@@ -581,7 +575,7 @@ + [(set_attr "type" "vecsimple")]) + + ;; +-(define_insn "altivec_vavgu" ++(define_insn "uavg3_ceil" + [(set (match_operand:VI 0 "register_operand" "=v") + (unspec:VI [(match_operand:VI 1 "register_operand" "v") + (match_operand:VI 2 "register_operand" "v")] +@@ -590,7 +584,7 @@ + "vavgu %0,%1,%2" + [(set_attr "type" "vecsimple")]) + +-(define_insn "altivec_vavgs" ++(define_insn "avg3_ceil" + [(set (match_operand:VI 0 "register_operand" "=v") + (unspec:VI [(match_operand:VI 1 "register_operand" "v") + (match_operand:VI 2 "register_operand" "v")] @@ -4317,223 +4311,6 @@ [(set_attr "length" "4") (set_attr "type" "vecsimple")]) @@ -51879,7 +58925,22 @@ UNSPECV_NLGR ; non-local goto receiver UNSPECV_MFFS ; Move from FPSCR UNSPECV_MTFSF ; Move to FPSCR Fields -@@ -12594,15 +12600,18 @@ +@@ -6692,14 +6698,6 @@ + ;; do the load 16-bits at a time. We could do this by loading from memory, + ;; and this is even supposed to be faster, but it is simpler not to get + ;; integers in the TOC. +-(define_insn "movsi_low" +- [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (mem:SI (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b") +- (match_operand 2 "" ""))))] +- "TARGET_MACHO && ! TARGET_64BIT" +- "lwz %0,lo16(%2)(%1)" +- [(set_attr "type" "load") +- (set_attr "length" "4")]) + + ;; MR LA LWZ LFIWZX LXSIWZX + ;; STW STFIWX STXSIWX LI LIS +@@ -12594,15 +12592,18 @@ [(unspec [(const_int 0)] UNSPEC_GRP_END_NOP)] "" { @@ -51902,7 +58963,7 @@ ;; Define the subtract-one-and-jump insns, starting with the template ;; so loop.c knows what to generate. -@@ -12699,7 +12708,7 @@ +@@ -12699,7 +12700,7 @@ const0_rtx); emit_insn (gen_rtx_SET (operands[3], gen_rtx_COMPARE (CCmode, operands[1], const1_rtx))); @@ -51911,7 +58972,7 @@ emit_insn (gen_add3 (operands[0], operands[1], constm1_rtx)); else { -@@ -12768,7 +12777,7 @@ +@@ -12768,7 +12769,7 @@ (const_int 0)])) (match_operand 4) (match_operand 5))) @@ -51920,7 +58981,7 @@ (plus:P (match_dup 0) (const_int -1))) (clobber (match_scratch:P 7)) -@@ -12801,7 +12810,7 @@ +@@ -12801,7 +12802,7 @@ else emit_insn (gen_cceq_ior_compare_complement (operands[9], andexpr, ctrcmpcc, operands[8], cccmp, ccin)); @@ -51929,7 +58990,7 @@ emit_insn (gen_add3 (ctrout, ctr, constm1_rtx)); else { -@@ -14597,7 +14606,225 @@ +@@ -14597,7 +14598,225 @@ "xscmpuqp %0,%1,%2" [(set_attr "type" "veccmp") (set_attr "size" "128")]) @@ -52175,7 +59236,665 @@ =================================================================== --- a/src/gcc/config/darwin.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/darwin.c (.../branches/gcc-8-branch) -@@ -2945,12 +2945,10 @@ +@@ -74,15 +74,9 @@ + setting the second word in the .non_lazy_symbol_pointer data + structure to symbol. See indirect_data for the code that handles + the extra indirection, and machopic_output_indirection and its use +- of MACHO_SYMBOL_STATIC for the code that handles @code{static} ++ of MACHO_SYMBOL_FLAG_STATIC for the code that handles @code{static} + symbol indirection. */ + +-/* For darwin >= 9 (OSX 10.5) the linker is capable of making the necessary +- branch islands and we no longer need to emit darwin stubs. +- However, if we are generating code for earlier systems (or for use in the +- kernel) the stubs might still be required, and this will be set true. */ +-int darwin_emit_branch_islands = false; +- + typedef struct GTY(()) cdtor_record { + rtx symbol; + int priority; /* [con/de]structor priority */ +@@ -104,6 +98,10 @@ + for weak or single-definition items. */ + static bool ld_uses_coal_sects = false; + ++/* Very old (ld_classic) linkers need a symbol to mark the start of ++ each FDE. */ ++static bool ld_needs_eh_markers = false; ++ + /* Section names. */ + section * darwin_sections[NUM_DARWIN_SECTIONS]; + +@@ -249,7 +247,7 @@ + int + machopic_symbol_defined_p (rtx sym_ref) + { +- if (SYMBOL_REF_FLAGS (sym_ref) & MACHO_SYMBOL_FLAG_DEFINED) ++ if (MACHO_SYMBOL_DEFINED_P (sym_ref)) + return true; + + /* If a symbol references local and is not an extern to this +@@ -258,7 +256,7 @@ + { + /* If the symbol references a variable and the variable is a + common symbol, then this symbol is not defined. */ +- if (SYMBOL_REF_FLAGS (sym_ref) & MACHO_SYMBOL_FLAG_VARIABLE) ++ if (MACHO_SYMBOL_VARIABLE_P (sym_ref)) + { + tree decl = SYMBOL_REF_DECL (sym_ref); + if (!decl) +@@ -454,6 +452,13 @@ + bool stub_p; + /* True iff this stub or pointer has been referenced. */ + bool used; ++ /* True iff a non-lazy symbol pointer should be emitted into the .data ++ section, rather than the non-lazy symbol pointers section. The cases ++ for which this occurred seem to have been unintentional, and later ++ toolchains emit all of the indirections to the 'usual' section. We ++ are keeping this in case it is necessary to preserve compatibility with ++ older toolchains. */ ++ bool nlsp_in_data_section; + } machopic_indirection; + + struct indirection_hasher : ggc_ptr_hash +@@ -488,7 +493,7 @@ + /* Return the name of the non-lazy pointer (if STUB_P is false) or + stub (if STUB_B is true) corresponding to the given name. + +- If we have a situation like: ++ PR71767 - If we have a situation like: + + global_weak_symbol: + .... +@@ -497,36 +502,22 @@ + + ld64 will be unable to split this into two atoms (because the "L" makes + the second symbol 'invisible'). This means that legitimate direct accesses +- to the second symbol will appear to be non-allowed direct accesses to an +- atom of type weak, global which are not allowed. ++ to the second symbol will appear to be direct accesses to an atom of type ++ weak, global which are not allowed. + +- To avoid this, we make the indirections have a leading 'l' (lower-case L) +- which has a special meaning: linker can see this and use it to determine +- atoms, but it is not placed into the final symbol table. ++ To avoid this, we make any data-section indirections have a leading 'l' ++ (lower-case L) which has a special meaning: linker can see this and use ++ it to determine atoms, but it is not placed into the final symbol table. + +- The implementation here is somewhat heavy-handed in that it will also mark +- indirections to the __IMPORT,__pointers section the same way which is +- really unnecessary, since ld64 _can_ split those into atoms as they are +- fixed size. FIXME: determine if this is a penalty worth extra code to +- fix. +- ++ Symbols in the non-lazy symbol pointers section (or stubs) do not have this ++ problem because ld64 already knows the size of each entry. + */ + + const char * + machopic_indirection_name (rtx sym_ref, bool stub_p) + { +- char *buffer; + const char *name = XSTR (sym_ref, 0); +- size_t namelen = strlen (name); +- machopic_indirection *p; +- bool needs_quotes; +- const char *suffix; +- char L_or_l = 'L'; +- const char *prefix = user_label_prefix; +- const char *quote = ""; +- tree id; +- +- id = maybe_get_identifier (name); ++ tree id = maybe_get_identifier (name); + if (id) + { + tree id_orig = id; +@@ -534,43 +525,47 @@ + while (IDENTIFIER_TRANSPARENT_ALIAS (id)) + id = TREE_CHAIN (id); + if (id != id_orig) +- { +- name = IDENTIFIER_POINTER (id); +- namelen = strlen (name); +- } ++ name = IDENTIFIER_POINTER (id); + } + ++ const char *prefix = user_label_prefix; ++ /* If we are emitting the label 'verbatim' then omit the U_L_P and count ++ the name without the leading '*'. */ + if (name[0] == '*') + { + prefix = ""; + ++name; +- --namelen; + } + +- needs_quotes = name_needs_quotes (name); +- if (needs_quotes) +- { +- quote = "\""; +- } ++ /* Here we are undoing a number of causes that placed some indirections ++ (apparently erroneously) into the .data section. Specifically, some ++ symbols that are ABI mandated indirections and some hidden symbols ++ were being placed there - which cause difficulties with later ++ versions of ld64. Iff (after these checks) some symbol still gets an ++ indirection in the data section, we want to adjust the indirection ++ name to be linker visible to deal with PR71767 (notes above). */ ++ bool nlsp_in_data_section = ++ ! MACHO_SYMBOL_MUST_INDIRECT_P (sym_ref) ++ && ! MACHO_SYMBOL_HIDDEN_VIS_P (sym_ref) ++ && (machopic_symbol_defined_p (sym_ref) || SYMBOL_REF_LOCAL_P (sym_ref)) ++ && ! indirect_data (sym_ref); + +- if (stub_p) +- suffix = STUB_SUFFIX; +- else +- { +- suffix = NON_LAZY_POINTER_SUFFIX; +- /* Let the linker see this. */ +- L_or_l = 'l'; +- } ++ const char *suffix = stub_p ? STUB_SUFFIX : NON_LAZY_POINTER_SUFFIX; ++ /* If the indirection is in the data section, let the linker see it. */ ++ char L_or_l = (!stub_p && nlsp_in_data_section) ? 'l' : 'L'; ++ /* We have mangled symbols with spaces and punctuation which typically ++ need surrounding in quotes for the assembler to consume them. */ ++ const char *quote = name_needs_quotes (name) ? "\"" : ""; ++ char *buffer = XALLOCAVEC (char, 2 /* strlen ("&L") or ("&l") */ ++ + strlen (prefix) ++ + strlen (name) ++ + strlen (suffix) ++ + 2 * strlen (quote) ++ + 1 /* '\0' */); + +- buffer = XALLOCAVEC (char, 2 /* strlen ("&L") or ("&l") */ +- + strlen (prefix) +- + namelen +- + strlen (suffix) +- + 2 * strlen (quote) +- + 1 /* '\0' */); +- + /* Construct the name of the non-lazy pointer or stub. */ +- sprintf (buffer, "&%s%c%s%s%s%s", quote, L_or_l, prefix, name, suffix, quote); ++ sprintf (buffer, "&%s%c%s%s%s%s", quote, L_or_l, prefix, name, ++ suffix, quote); + + if (!machopic_indirections) + machopic_indirections = hash_table::create_ggc (37); +@@ -579,10 +574,9 @@ + = machopic_indirections->find_slot_with_hash (buffer, + htab_hash_string (buffer), + INSERT); ++ machopic_indirection *p; + if (*slot) +- { +- p = *slot; +- } ++ p = *slot; + else + { + p = ggc_alloc (); +@@ -590,6 +584,7 @@ + p->ptr_name = xstrdup (buffer); + p->stub_p = stub_p; + p->used = false; ++ p->nlsp_in_data_section = nlsp_in_data_section; + *slot = p; + } + +@@ -665,7 +660,7 @@ + /* some other cpu -- writeme! */ + gcc_unreachable (); + } +- else if (defined) ++ else if (defined && ! MACHO_SYMBOL_MUST_INDIRECT_P (orig)) + { + rtx offset = NULL; + if (DARWIN_PPC || HAVE_lo_sum) +@@ -707,6 +702,7 @@ + machopic_indirection_name (orig, /*stub_p=*/false))); + + SYMBOL_REF_DATA (ptr_ref) = SYMBOL_REF_DATA (orig); ++ SYMBOL_REF_FLAGS (ptr_ref) |= MACHO_SYMBOL_FLAG_INDIRECTION; + + ptr_ref = gen_const_mem (Pmode, ptr_ref); + machopic_define_symbol (ptr_ref); +@@ -789,7 +785,7 @@ + rtx + machopic_indirect_call_target (rtx target) + { +- if (! darwin_emit_branch_islands) ++ if (! darwin_symbol_stubs) + return target; + + if (GET_CODE (target) != MEM) +@@ -797,8 +793,7 @@ + + if (MACHOPIC_INDIRECT + && GET_CODE (XEXP (target, 0)) == SYMBOL_REF +- && !(SYMBOL_REF_FLAGS (XEXP (target, 0)) +- & MACHO_SYMBOL_FLAG_DEFINED)) ++ && ! MACHO_SYMBOL_DEFINED_P (XEXP (target, 0))) + { + rtx sym_ref = XEXP (target, 0); + const char *stub_name = machopic_indirection_name (sym_ref, +@@ -807,6 +802,7 @@ + + XEXP (target, 0) = gen_rtx_SYMBOL_REF (mode, stub_name); + SYMBOL_REF_DATA (XEXP (target, 0)) = SYMBOL_REF_DATA (sym_ref); ++ SYMBOL_REF_FLAGS (XEXP (target, 0)) |= MACHO_SYMBOL_FLAG_INDIRECTION; + MEM_READONLY_P (target) = 1; + MEM_NOTRAP_P (target) = 1; + } +@@ -844,7 +840,7 @@ + { + if (reg == 0) + { +- gcc_assert (!reload_in_progress); ++ gcc_assert (!lra_in_progress); + reg = gen_reg_rtx (Pmode); + } + +@@ -928,7 +924,7 @@ + emit_use (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM)); + #endif + +- if (reload_in_progress) ++ if (lra_in_progress) + df_set_regs_ever_live (REGNO (pic), true); + pic_ref = gen_rtx_PLUS (Pmode, pic, + machopic_gen_offset (XEXP (orig, 0))); +@@ -952,7 +948,7 @@ + + if (reg == 0) + { +- gcc_assert (!reload_in_progress); ++ gcc_assert (!lra_in_progress); + reg = gen_reg_rtx (Pmode); + } + +@@ -998,7 +994,7 @@ + #if 0 + emit_use (pic_offset_table_rtx); + #endif +- if (reload_in_progress) ++ if (lra_in_progress) + df_set_regs_ever_live (REGNO (pic), true); + pic_ref = gen_rtx_PLUS (Pmode, + pic, +@@ -1075,129 +1071,160 @@ + return pic_ref; + } + +-/* Output the stub or non-lazy pointer in *SLOT, if it has been used. +- DATA is the FILE* for assembly output. Called from +- htab_traverse. */ ++/* Callbacks to output the stub or non-lazy pointers. ++ Each works on the item in *SLOT,if it has been used. ++ DATA is the FILE* for assembly output. ++ Called from htab_traverses, invoked from machopic_finish(). */ + + int +-machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file) ++machopic_output_data_section_indirection (machopic_indirection **slot, ++ FILE *asm_out_file) + { + machopic_indirection *p = *slot; +- rtx symbol; +- const char *sym_name; +- const char *ptr_name; + +- if (!p->used) ++ if (!p->used || !p->nlsp_in_data_section) + return 1; + +- symbol = p->symbol; +- sym_name = XSTR (symbol, 0); +- ptr_name = p->ptr_name; ++ rtx symbol = p->symbol; ++ /* The original symbol name. */ ++ const char *sym_name = XSTR (symbol, 0); ++ /* The name of the indirection symbol. */ ++ const char *ptr_name = p->ptr_name; + +- if (p->stub_p) +- { +- char *sym; +- char *stub; +- tree id; ++ switch_to_section (data_section); ++ assemble_align (GET_MODE_ALIGNMENT (Pmode)); ++ assemble_label (asm_out_file, ptr_name); ++ assemble_integer (gen_rtx_SYMBOL_REF (Pmode, sym_name), ++ GET_MODE_SIZE (Pmode), ++ GET_MODE_ALIGNMENT (Pmode), 1); + +- id = maybe_get_identifier (sym_name); +- if (id) +- { +- tree id_orig = id; ++ return 1; ++} + +- while (IDENTIFIER_TRANSPARENT_ALIAS (id)) +- id = TREE_CHAIN (id); +- if (id != id_orig) +- sym_name = IDENTIFIER_POINTER (id); +- } ++int ++machopic_output_stub_indirection (machopic_indirection **slot, ++ FILE *asm_out_file) ++{ ++ machopic_indirection *p = *slot; + +- sym = XALLOCAVEC (char, strlen (sym_name) + 2); +- if (sym_name[0] == '*' || sym_name[0] == '&') +- strcpy (sym, sym_name + 1); +- else if (sym_name[0] == '-' || sym_name[0] == '+') +- strcpy (sym, sym_name); +- else +- sprintf (sym, "%s%s", user_label_prefix, sym_name); ++ if (!p->used || !p->stub_p) ++ return 1; + +- stub = XALLOCAVEC (char, strlen (ptr_name) + 2); +- if (ptr_name[0] == '*' || ptr_name[0] == '&') +- strcpy (stub, ptr_name + 1); +- else +- sprintf (stub, "%s%s", user_label_prefix, ptr_name); ++ rtx symbol = p->symbol; ++ /* The original symbol name. */ ++ const char *sym_name = XSTR (symbol, 0); ++ /* The name of the stub symbol. */ ++ const char *ptr_name = p->ptr_name; + +- machopic_output_stub (asm_out_file, sym, stub); +- } +- else if (! indirect_data (symbol) +- && (machopic_symbol_defined_p (symbol) +- || SYMBOL_REF_LOCAL_P (symbol))) ++ tree id = maybe_get_identifier (sym_name); ++ if (id) + { +- switch_to_section (data_section); +- assemble_align (GET_MODE_ALIGNMENT (Pmode)); +- assemble_label (asm_out_file, ptr_name); +- assemble_integer (gen_rtx_SYMBOL_REF (Pmode, sym_name), +- GET_MODE_SIZE (Pmode), +- GET_MODE_ALIGNMENT (Pmode), 1); ++ tree id_orig = id; ++ ++ while (IDENTIFIER_TRANSPARENT_ALIAS (id)) ++ id = TREE_CHAIN (id); ++ if (id != id_orig) ++ sym_name = IDENTIFIER_POINTER (id); + } ++ ++ char *sym = XALLOCAVEC (char, strlen (sym_name) + 2); ++ if (sym_name[0] == '*' || sym_name[0] == '&') ++ strcpy (sym, sym_name + 1); ++ else if (sym_name[0] == '-' || sym_name[0] == '+') ++ strcpy (sym, sym_name); + else +- { +- rtx init = const0_rtx; ++ sprintf (sym, "%s%s", user_label_prefix, sym_name); + +- switch_to_section (darwin_sections[machopic_nl_symbol_ptr_section]); ++ char *stub = XALLOCAVEC (char, strlen (ptr_name) + 2); ++ if (ptr_name[0] == '*' || ptr_name[0] == '&') ++ strcpy (stub, ptr_name + 1); ++ else ++ sprintf (stub, "%s%s", user_label_prefix, ptr_name); + +- /* Mach-O symbols are passed around in code through indirect +- references and the original symbol_ref hasn't passed through +- the generic handling and reference-catching in +- output_operand, so we need to manually mark weak references +- as such. */ +- if (SYMBOL_REF_WEAK (symbol)) +- { +- tree decl = SYMBOL_REF_DECL (symbol); +- gcc_assert (DECL_P (decl)); ++ machopic_output_stub (asm_out_file, sym, stub); + +- if (decl != NULL_TREE +- && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl) +- /* Handle only actual external-only definitions, not +- e.g. extern inline code or variables for which +- storage has been allocated. */ +- && !TREE_STATIC (decl)) +- { +- fputs ("\t.weak_reference ", asm_out_file); +- assemble_name (asm_out_file, sym_name); +- fputc ('\n', asm_out_file); +- } +- } ++ return 1; ++} + +- assemble_name (asm_out_file, ptr_name); +- fprintf (asm_out_file, ":\n"); ++int ++machopic_output_indirection (machopic_indirection **slot, FILE *asm_out_file) ++{ ++ machopic_indirection *p = *slot; + +- fprintf (asm_out_file, "\t.indirect_symbol "); +- assemble_name (asm_out_file, sym_name); +- fprintf (asm_out_file, "\n"); ++ if (!p->used || p->stub_p || p->nlsp_in_data_section) ++ return 1; + +- /* Variables that are marked with MACHO_SYMBOL_STATIC need to +- have their symbol name instead of 0 in the second entry of +- the non-lazy symbol pointer data structure when they are +- defined. This allows the runtime to rebind newer instances +- of the translation unit with the original instance of the +- symbol. */ ++ rtx symbol = p->symbol; ++ /* The original symbol name. */ ++ const char *sym_name = XSTR (symbol, 0); ++ /* The nonlazy-stub symbol name. */ ++ const char *ptr_name = p->ptr_name; + +- if ((SYMBOL_REF_FLAGS (symbol) & MACHO_SYMBOL_STATIC) +- && machopic_symbol_defined_p (symbol)) +- init = gen_rtx_SYMBOL_REF (Pmode, sym_name); ++ switch_to_section (darwin_sections[machopic_nl_symbol_ptr_section]); + +- assemble_integer (init, GET_MODE_SIZE (Pmode), +- GET_MODE_ALIGNMENT (Pmode), 1); ++ /* Mach-O symbols are passed around in code through indirect references and ++ the original symbol_ref hasn't passed through the generic handling and ++ reference-catching in output_operand, so we need to manually mark weak ++ references as such. */ ++ ++ if (SYMBOL_REF_WEAK (symbol)) ++ { ++ tree decl = SYMBOL_REF_DECL (symbol); ++ gcc_checking_assert (DECL_P (decl)); ++ ++ if (decl != NULL_TREE ++ && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl) ++ /* Handle only actual external-only definitions, not ++ e.g. extern inline code or variables for which ++ storage has been allocated. */ ++ && !TREE_STATIC (decl)) ++ { ++ fputs ("\t.weak_reference ", asm_out_file); ++ assemble_name (asm_out_file, sym_name); ++ fputc ('\n', asm_out_file); ++ } + } + ++ assemble_name (asm_out_file, ptr_name); ++ fprintf (asm_out_file, ":\n"); ++ ++ fprintf (asm_out_file, "\t.indirect_symbol "); ++ assemble_name (asm_out_file, sym_name); ++ fprintf (asm_out_file, "\n"); ++ ++ /* Variables that are marked with MACHO_SYMBOL_FLAG_STATIC need to ++ have their symbol name instead of 0 in the second entry of ++ the non-lazy symbol pointer data structure when they are ++ defined. This allows the runtime to rebind newer instances ++ of the translation unit with the original instance of the ++ symbol. */ ++ ++ rtx init = const0_rtx; ++ if (MACHO_SYMBOL_STATIC_P (symbol) && machopic_symbol_defined_p (symbol)) ++ init = gen_rtx_SYMBOL_REF (Pmode, sym_name); ++ ++ assemble_integer (init, GET_MODE_SIZE (Pmode), ++ GET_MODE_ALIGNMENT (Pmode), 1); ++ + return 1; + } + +-void ++static void + machopic_finish (FILE *asm_out_file) + { +- if (machopic_indirections) +- machopic_indirections +- ->traverse_noresize (asm_out_file); ++ if (!machopic_indirections) ++ return; ++ ++ /* First output an symbol indirections that have been placed into .data ++ (we don't expect these now). */ ++ machopic_indirections->traverse_noresize ++ (asm_out_file); ++ ++ machopic_indirections->traverse_noresize ++ (asm_out_file); ++ ++ machopic_indirections->traverse_noresize ++ (asm_out_file); + } + + int +@@ -1212,25 +1239,51 @@ + && XINT (XEXP (op, 0), 1) == UNSPEC_MACHOPIC_OFFSET); + } + +-/* This function records whether a given name corresponds to a defined +- or undefined function or variable, for machopic_classify_ident to +- use later. */ ++/* This function: ++ computes and caches a series of flags that characterise the symbol's ++ properties that affect Mach-O code gen (including accidental cases ++ from older toolchains). + ++ TODO: ++ Here we also need to do enough analysis to determine if a symbol's ++ name needs to be made linker-visible. This is more tricky - since ++ it depends on whether we've previously seen a global weak definition ++ in the same section. ++ */ ++ + void +-darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) ++darwin_encode_section_info (tree decl, rtx rtl, int first) + { +- rtx sym_ref; ++ /* Careful not to prod global register variables. */ ++ if (!MEM_P (rtl)) ++ return; + +- /* Do the standard encoding things first. */ ++ /* Do the standard encoding things first; this sets: ++ SYMBOL_FLAG_FUNCTION, ++ SYMBOL_FLAG_LOCAL, (binds_local_p) ++ TLS_MODEL, SYMBOL_FLAG_SMALL ++ SYMBOL_FLAG_EXTERNAL. */ + default_encode_section_info (decl, rtl, first); + +- if (TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL) ++ if (! VAR_OR_FUNCTION_DECL_P (decl)) + return; + +- sym_ref = XEXP (rtl, 0); +- if (TREE_CODE (decl) == VAR_DECL) ++ rtx sym_ref = XEXP (rtl, 0); ++ if (VAR_P (decl)) + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_VARIABLE; + ++ /* Only really common if there's no initialiser. */ ++ bool really_common_p = (DECL_COMMON (decl) ++ && (DECL_INITIAL (decl) == NULL ++ || (!in_lto_p ++ && DECL_INITIAL (decl) == error_mark_node))); ++ ++ /* For Darwin, if we have specified visibility and it's not the default ++ that's counted 'hidden'. */ ++ if (DECL_VISIBILITY_SPECIFIED (decl) ++ && DECL_VISIBILITY (decl) != VISIBILITY_DEFAULT) ++ SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_HIDDEN_VIS; ++ + if (!DECL_EXTERNAL (decl) + && (!TREE_PUBLIC (decl) || !DECL_WEAK (decl)) + && ! lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)) +@@ -1241,7 +1294,13 @@ + SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_DEFINED; + + if (! TREE_PUBLIC (decl)) +- SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_STATIC; ++ SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_STATIC; ++ ++ /* Short cut check for Darwin 'must indirect' rules. */ ++ if (really_common_p ++ || (DECL_WEAK (decl) && ! MACHO_SYMBOL_HIDDEN_VIS_P (sym_ref)) ++ || lookup_attribute ("weakref", DECL_ATTRIBUTES (decl))) ++ SYMBOL_REF_FLAGS (sym_ref) |= MACHO_SYMBOL_FLAG_MUST_INDIRECT; + } + + void +@@ -1258,12 +1317,13 @@ + } + + static section * +-darwin_rodata_section (int use_coal, bool zsize) ++darwin_rodata_section (int use_coal, bool zsize, int reloc) + { + return (use_coal + ? darwin_sections[const_coal_section] + : (zsize ? darwin_sections[zobj_const_section] +- : darwin_sections[const_section])); ++ : reloc ? darwin_sections[const_data_section] ++ : darwin_sections[const_section])); + } + + static section * +@@ -1556,7 +1616,7 @@ + + case SECCAT_RODATA: + case SECCAT_SRODATA: +- base_section = darwin_rodata_section (use_coal, zsize); ++ base_section = darwin_rodata_section (use_coal, zsize, reloc); + break; + + case SECCAT_RODATA_MERGE_STR: +@@ -2092,11 +2152,11 @@ + static int invok_count = 0; + static tree last_fun_decl = NULL_TREE; + +- /* We use the linker to emit the .eh labels for Darwin 9 and above. */ +- if (! for_eh || generating_for_darwin_version >= 9) ++ /* Modern linkers can produce distinct FDEs without compiler support. */ ++ if (! for_eh || ! ld_needs_eh_markers) + return; + +- /* FIXME: This only works when the eh for all sections of a function is ++ /* FIXME: This only works when the eh for all sections of a function are + emitted at the same time. If that changes, we would need to use a lookup + table of some form to determine what to do. Also, we should emit the + unadorned label for the partition containing the public label for a +@@ -2945,12 +3005,10 @@ if (flag_objc_abi >= 2) { flags = 16; @@ -52190,7 +59909,36 @@ ASM_OUTPUT_ALIGN (asm_out_file, 2); fputs ("L_OBJC_ImageInfo:\n", asm_out_file); -@@ -3242,8 +3240,6 @@ +@@ -3156,17 +3214,19 @@ + : (generating_for_darwin_version >= 9) ? 1 + : 0); + +- /* Objective-C family ABI 2 is only valid for next/m64 at present. */ + if (global_options_set.x_flag_objc_abi && flag_next_runtime) + { +- if (TARGET_64BIT && global_options.x_flag_objc_abi < 2) +- error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 must be" +- " used for %<-m64%> targets with" +- " %<-fnext-runtime%>"); +- if (!TARGET_64BIT && global_options.x_flag_objc_abi >= 2) +- error_at (UNKNOWN_LOCATION, "%<-fobjc-abi-version%> >= 2 is not" +- " supported on %<-m32%> targets with" +- " %<-fnext-runtime%>"); ++ if (TARGET_64BIT && global_options.x_flag_objc_abi != 2) ++ /* The Objective-C family ABI 2 is the only valid version NeXT/m64. */ ++ error_at (UNKNOWN_LOCATION, ++ "%<-fobjc-abi-version%> 2 must be used for 64 bit targets" ++ " with %<-fnext-runtime%>"); ++ else if (!TARGET_64BIT && global_options.x_flag_objc_abi >= 2) ++ /* ABI versions 0 and 1 are the only valid versions NeXT/m32. */ ++ error_at (UNKNOWN_LOCATION, ++ "%<-fobjc-abi-version%> %d is not supported for 32 bit" ++ " targets with %<-fnext-runtime%>", ++ global_options.x_flag_objc_abi); + } + + /* Don't emit DWARF3/4 unless specifically selected. This is a +@@ -3242,8 +3302,6 @@ /* so no tables either.. */ flag_unwind_tables = 0; flag_asynchronous_unwind_tables = 0; @@ -52199,7 +59947,7 @@ } if (flag_var_tracking_uninit == 0 -@@ -3253,6 +3249,8 @@ +@@ -3253,6 +3311,8 @@ && write_symbols == DWARF2_DEBUG) flag_var_tracking_uninit = flag_var_tracking; @@ -52208,7 +59956,7 @@ if (MACHO_DYNAMIC_NO_PIC_P) { if (flag_pic) -@@ -3261,9 +3259,11 @@ +@@ -3261,18 +3321,53 @@ " %<-fpie%> or %<-fPIE%>"); flag_pic = 0; } @@ -52222,11 +59970,121 @@ flag_pic = 2; } +- /* It is assumed that branch island stubs are needed for earlier systems. */ +- if (generating_for_darwin_version < 9) +- darwin_emit_branch_islands = true; +- else +- emit_aligned_common = true; /* Later systems can support aligned common. */ ++ /* Linkers >= ld64-62.1 (at least) are capable of making the necessary PIC ++ indirections and we no longer need to emit pic symbol stubs. ++ However, if we are generating code for earlier ones (or for use in the ++ kernel) the stubs might still be required, and this will be set true. ++ If the user sets it on or off - then that takes precedence. + ++ Linkers that don't need stubs, don't need the EH symbol markers either. ++ */ ++ ++ if (!global_options_set.x_darwin_symbol_stubs) ++ { ++ if (darwin_target_linker) ++ { ++ if (strverscmp (darwin_target_linker, MIN_LD64_OMIT_STUBS) < 0) ++ { ++ darwin_symbol_stubs = true; ++ ld_needs_eh_markers = true; ++ } ++ } ++ else if (generating_for_darwin_version < 9) ++ { ++ /* If we don't know the linker version and we're targeting an old ++ system, we know no better than to assume the use of an earlier ++ linker. */ ++ darwin_symbol_stubs = true; ++ ld_needs_eh_markers = true; ++ } ++ } ++ else if (DARWIN_X86 && darwin_symbol_stubs && TARGET_64BIT) ++ { ++ inform (input_location, ++ "%<-msymbol-stubs%> is not required for 64b code (ignored)"); ++ darwin_symbol_stubs = false; ++ } ++ ++ if (generating_for_darwin_version >= 9) ++ /* Later systems can support aligned common. */ ++ emit_aligned_common = true; ++ + /* The c_dialect...() macros are not available to us here. */ + darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0); + } Index: gcc/config/darwin.h =================================================================== --- a/src/gcc/config/darwin.h (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/darwin.h (.../branches/gcc-8-branch) -@@ -178,7 +178,7 @@ +@@ -129,6 +129,24 @@ + "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform } \ + %= 10.5 mmacosx-version-min= -pie) }} " ++ ++#define DARWIN_NOPIE_SPEC \ ++"%{no-pie|fno-pie|fno-PIE: \ ++ %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) }" ++ + #define DARWIN_CC1_SPEC \ + "%{findirect-virtual-calls: -fapple-kext} %= 10.6 mmacosx-version-min= -no_compact_unwind) " ++ ++/* In Darwin linker specs we can put -lcrt0.o and ld will search the library ++ path for crt0.o or -lcrtx.a and it will search for for libcrtx.a. As for ++ other ports, we can also put xxx.{o,a}%s and get the appropriate complete ++ startfile absolute directory. This latter point is important when we want ++ to override ld's rule of .dylib being found ahead of .a and the user wants ++ the convenience library to be linked. */ ++ ++/* The LINK_COMMAND spec is mostly a clone of the standard LINK_COMMAND_SPEC, ++ plus precomp, libtool, and fat build additions. ++ + In general, random Darwin linker flags should go into LINK_SPEC + instead of LINK_COMMAND_SPEC. The command spec is better for + specifying the handling of options understood by generic Unix + linkers, and for positional arguments like libraries. */ + +-#if LD64_HAS_EXPORT_DYNAMIC +-#define DARWIN_EXPORT_DYNAMIC " %{rdynamic:-export_dynamic}" +-#else +-#define DARWIN_EXPORT_DYNAMIC " %{rdynamic: %nrdynamic is not supported}" +-#endif +- + #define LINK_COMMAND_SPEC_A \ + "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ %(linker)" \ LINK_PLUGIN_SPEC \ "%{flto*:% 10.5 mmacosx-version-min= -lgcc_s.10.4) \ ++ shared-libgcc|fexceptions|fobjc-exceptions|fgnu-runtime: \ ++ %:version-compare(!> 10.3.9 mmacosx-version-min= -lgcc_eh) \ ++ %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ +- %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ ++ %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ + %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ + -lgcc ; \ + :%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \ +- %:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ ++ %:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_ext.10.4) \ + %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \ + -lgcc }" + +-/* We specify crt0.o as -lcrt0.o so that ld will search the library path. ++/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ + +- crt3.o provides __cxa_atexit on systems that don't have it. Since +- it's only used with C++, which requires passing -shared-libgcc, key +- off that to avoid unnecessarily adding a destructor to every +- powerpc program built. */ +- + #undef STARTFILE_SPEC + #define STARTFILE_SPEC \ +- "%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \ +- %{!Zdynamiclib:%{Zbundle:%{!static: \ ++"%{Zdynamiclib: %(darwin_dylib1) %{fgnu-tm: -lcrttms.o}} \ ++ %{!Zdynamiclib:%{Zbundle:%{!static: \ + %:version-compare(< 10.6 mmacosx-version-min= -lbundle1.o) \ + %{fgnu-tm: -lcrttms.o}}} \ + %{!Zbundle:%{pg:%{static:-lgcrt0.o} \ +@@ -380,7 +409,7 @@ + %{!object:%{preload:-lcrt0.o} \ + %{!preload: %(darwin_crt1) \ + %(darwin_crt2)}}}}}} \ +- %{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}" ++ %(darwin_crt3)" + + /* We want a destructor last in the list. */ + #define TM_DESTRUCTOR "%{fgnu-tm: -lcrttme.o}" +@@ -388,12 +417,10 @@ + + #define DARWIN_EXTRA_SPECS \ + { "darwin_crt1", DARWIN_CRT1_SPEC }, \ ++ { "darwin_crt2", DARWIN_CRT2_SPEC }, \ ++ { "darwin_crt3", DARWIN_CRT3_SPEC }, \ + { "darwin_dylib1", DARWIN_DYLIB1_SPEC }, + +-#define DARWIN_DYLIB1_SPEC \ +- "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \ +- %:version-compare(>< 10.5 10.6 mmacosx-version-min= -ldylib1.10.5.o)" +- + #define DARWIN_CRT1_SPEC \ + "%:version-compare(!> 10.5 mmacosx-version-min= -lcrt1.o) \ + %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lcrt1.10.5.o) \ +@@ -400,6 +427,20 @@ + %:version-compare(>< 10.6 10.8 mmacosx-version-min= -lcrt1.10.6.o) \ + %{fgnu-tm: -lcrttms.o}" + ++#define DARWIN_CRT2_SPEC "" ++ ++/* crt3.o provides __cxa_atexit on systems that don't have it (and a fix ++ up for faulty versions on 10.4). Since it's only used with C++, which ++ requires passing -shared-libgcc, key off that to avoid unnecessarily ++ adding a destructor to every program built for 10.4 or earlier. */ ++ ++#define DARWIN_CRT3_SPEC \ ++"%{shared-libgcc:%:version-compare(< 10.5 mmacosx-version-min= crt3.o%s)}" ++ ++#define DARWIN_DYLIB1_SPEC \ ++ "%:version-compare(!> 10.5 mmacosx-version-min= -ldylib1.o) \ ++ %:version-compare(>< 10.5 10.6 mmacosx-version-min= -ldylib1.10.5.o)" ++ + #ifdef HAVE_AS_MMACOSX_VERSION_MIN_OPTION + /* Emit macosx version (but only major). */ + #define ASM_MMACOSX_VERSION_MIN_SPEC \ +@@ -765,21 +806,52 @@ + #undef TARGET_ASM_MARK_DECL_PRESERVED + #define TARGET_ASM_MARK_DECL_PRESERVED darwin_mark_decl_preserved + +-/* Set on a symbol with SYMBOL_FLAG_FUNCTION or +- MACHO_SYMBOL_FLAG_VARIABLE to indicate that the function or +- variable has been defined in this translation unit. +- When porting Mach-O to new architectures you need to make +- sure these aren't clobbered by the backend. */ ++/* Any port using this header needs to define the first available ++ subtarget symbol bit: SYMBOL_FLAG_SUBT_DEP. */ + +-#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_MACH_DEP) +-#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_MACH_DEP) << 1) ++/* Is a variable. */ ++#define MACHO_SYMBOL_FLAG_VARIABLE (SYMBOL_FLAG_SUBT_DEP) ++#define MACHO_SYMBOL_VARIABLE_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_VARIABLE) != 0) + ++/* Set on a symbol that must be indirected, even when there is a ++ definition in the TU. The ABI mandates that common symbols are so ++ indirected, as are weak. If 'fix-and-continue' is operational then ++ data symbols might also be. */ ++ ++#define MACHO_SYMBOL_FLAG_MUST_INDIRECT ((SYMBOL_FLAG_SUBT_DEP) << 1) ++#define MACHO_SYMBOL_MUST_INDIRECT_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_MUST_INDIRECT) != 0) ++ ++/* Set on a symbol with SYMBOL_FLAG_FUNCTION or MACHO_SYMBOL_FLAG_VARIABLE ++ to indicate that the function or variable is considered defined in this ++ translation unit. */ ++ ++#define MACHO_SYMBOL_FLAG_DEFINED ((SYMBOL_FLAG_SUBT_DEP) << 2) ++#define MACHO_SYMBOL_DEFINED_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_DEFINED) != 0) ++ ++/* Set on a symbol that has specified non-default visibility. */ ++ ++#define MACHO_SYMBOL_FLAG_HIDDEN_VIS ((SYMBOL_FLAG_SUBT_DEP) << 3) ++#define MACHO_SYMBOL_HIDDEN_VIS_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_HIDDEN_VIS) != 0) ++ ++/* Set on a symbol that is a pic stub or symbol indirection (i.e. the ++ L_xxxxx${stub,non_lazy_ptr,lazy_ptr}. */ ++ ++#define MACHO_SYMBOL_FLAG_INDIRECTION ((SYMBOL_FLAG_SUBT_DEP) << 5) ++#define MACHO_SYMBOL_INDIRECTION_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_INDIRECTION) != 0) ++ + /* Set on a symbol to indicate when fix-and-continue style code + generation is being used and the symbol refers to a static symbol + that should be rebound from new instances of a translation unit to + the original instance of the data. */ + +-#define MACHO_SYMBOL_STATIC ((SYMBOL_FLAG_MACH_DEP) << 2) ++#define MACHO_SYMBOL_FLAG_STATIC ((SYMBOL_FLAG_SUBT_DEP) << 6) ++#define MACHO_SYMBOL_STATIC_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & MACHO_SYMBOL_FLAG_STATIC) != 0) + + /* Symbolic names for various things we might know about a symbol. */ + +@@ -972,8 +1044,12 @@ + _tested_ version known to support this so far. */ + #define MIN_LD64_NO_COAL_SECTS "236.4" + ++/* From at least version 62.1, ld64 can build symbol indirection stubs as ++ needed, and there is no need for the compiler to emit them. */ ++#define MIN_LD64_OMIT_STUBS "85.2" ++ + #ifndef LD64_VERSION +-#define LD64_VERSION "85.2" ++#define LD64_VERSION "62.1" + #else + #define DEF_LD64 LD64_VERSION + #endif +Index: gcc/config/darwin10.h +=================================================================== +--- a/src/gcc/config/darwin10.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/darwin10.h (.../branches/gcc-8-branch) +@@ -18,17 +18,13 @@ + along with GCC; see the file COPYING3. If not see + . */ + +-/* Fix PR41260 by passing -no_compact_unwind on darwin10 and later until +- unwinder in libSystem is fixed to digest new epilog unwinding notes. ++/* Fix PR47558 by linking against libSystem ahead of libgcc_ext. */ + +- Fix PR47558 by linking against libSystem ahead of libgcc_ext. */ + #undef LINK_GCC_C_SEQUENCE_SPEC + #define LINK_GCC_C_SEQUENCE_SPEC \ +-"%:version-compare(>= 10.6 mmacosx-version-min= -no_compact_unwind) \ +- %{!static:%{!static-libgcc: \ +- %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ +- %{fno-pic|fno-PIC|fno-pie|fno-PIE|fapple-kext|mkernel|static|mdynamic-no-pic: \ +- %:version-compare(>= 10.7 mmacosx-version-min= -no_pie) } %G %L" ++"%{!static:%{!static-libgcc: \ ++ %:version-compare(>= 10.6 mmacosx-version-min= -lSystem) } } \ ++ %G %L" + + #undef DEF_MIN_OSX_VERSION + #define DEF_MIN_OSX_VERSION "10.6" Index: gcc/config/arm/arm.c =================================================================== --- a/src/gcc/config/arm/arm.c (.../tags/gcc_8_3_0_release) @@ -52336,6 +60437,160 @@ } for (i = 0; i < nops; i++) +@@ -19508,6 +19516,35 @@ + return save_reg_mask; + } + ++/* Return a mask for the call-clobbered low registers that are unused ++ at the end of the prologue. */ ++static unsigned long ++thumb1_prologue_unused_call_clobbered_lo_regs (void) ++{ ++ unsigned long mask = 0; ++ ++ for (int reg = 0; reg <= LAST_LO_REGNUM; reg++) ++ if (!callee_saved_reg_p (reg) ++ && !REGNO_REG_SET_P (df_get_live_out (ENTRY_BLOCK_PTR_FOR_FN (cfun)), ++ reg)) ++ mask |= 1 << reg; ++ return mask; ++} ++ ++/* Similarly for the start of the epilogue. */ ++static unsigned long ++thumb1_epilogue_unused_call_clobbered_lo_regs (void) ++{ ++ unsigned long mask = 0; ++ ++ for (int reg = 0; reg <= LAST_LO_REGNUM; reg++) ++ if (!callee_saved_reg_p (reg) ++ && !REGNO_REG_SET_P (df_get_live_in (EXIT_BLOCK_PTR_FOR_FN (cfun)), ++ reg)) ++ mask |= 1 << reg; ++ return mask; ++} ++ + /* Compute a bit mask of which core registers need to be + saved on the stack for the current function. */ + static unsigned long +@@ -19539,10 +19576,19 @@ + if (mask & 0xff || thumb_force_lr_save ()) + mask |= (1 << LR_REGNUM); + +- /* Make sure we have a low work register if we need one. +- We will need one if we are going to push a high register, +- but we are not currently intending to push a low register. */ ++ bool call_clobbered_scratch ++ = (thumb1_prologue_unused_call_clobbered_lo_regs () ++ && thumb1_epilogue_unused_call_clobbered_lo_regs ()); ++ ++ /* Make sure we have a low work register if we need one. We will ++ need one if we are going to push a high register, but we are not ++ currently intending to push a low register. However if both the ++ prologue and epilogue have a spare call-clobbered low register, ++ then we won't need to find an additional work register. It does ++ not need to be the same register in the prologue and ++ epilogue. */ + if ((mask & 0xff) == 0 ++ && !call_clobbered_scratch + && ((mask & 0x0f00) || TARGET_BACKTRACE)) + { + /* Use thumb_find_work_register to choose which register +@@ -24768,12 +24814,7 @@ + unsigned long mask = live_regs_mask & 0xff; + int next_hi_reg; + +- /* The available low registers depend on the size of the value we are +- returning. */ +- if (size <= 12) +- mask |= 1 << 3; +- if (size <= 8) +- mask |= 1 << 2; ++ mask |= thumb1_epilogue_unused_call_clobbered_lo_regs (); + + if (mask == 0) + /* Oh dear! We have no low registers into which we can pop +@@ -24781,7 +24822,7 @@ + internal_error + ("no low registers available for popping high registers"); + +- for (next_hi_reg = 8; next_hi_reg < 13; next_hi_reg++) ++ for (next_hi_reg = 12; next_hi_reg > LAST_LO_REGNUM; next_hi_reg--) + if (live_regs_mask & (1 << next_hi_reg)) + break; + +@@ -24789,7 +24830,7 @@ + { + /* Find lo register(s) into which the high register(s) can + be popped. */ +- for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ++ for (regno = LAST_LO_REGNUM; regno >= 0; regno--) + { + if (mask & (1 << regno)) + high_regs_pushed--; +@@ -24797,13 +24838,14 @@ + break; + } + +- mask &= (2 << regno) - 1; /* A noop if regno == 8 */ ++ if (high_regs_pushed == 0 && regno >= 0) ++ mask &= ~((1 << regno) - 1); + + /* Pop the values into the low register(s). */ + thumb_pop (asm_out_file, mask); + + /* Move the value(s) into the high registers. */ +- for (regno = 0; regno <= LAST_LO_REGNUM; regno++) ++ for (regno = LAST_LO_REGNUM; regno >= 0; regno--) + { + if (mask & (1 << regno)) + { +@@ -24810,7 +24852,8 @@ + asm_fprintf (asm_out_file, "\tmov\t%r, %r\n", next_hi_reg, + regno); + +- for (next_hi_reg++; next_hi_reg < 13; next_hi_reg++) ++ for (next_hi_reg--; next_hi_reg > LAST_LO_REGNUM; ++ next_hi_reg--) + if (live_regs_mask & (1 << next_hi_reg)) + break; + } +@@ -25192,10 +25235,20 @@ + break; + + /* Here we need to mask out registers used for passing arguments +- even if they can be pushed. This is to avoid using them to stash the high +- registers. Such kind of stash may clobber the use of arguments. */ ++ even if they can be pushed. This is to avoid using them to ++ stash the high registers. Such kind of stash may clobber the ++ use of arguments. */ + pushable_regs = l_mask & (~arg_regs_mask); +- if (lr_needs_saving) ++ pushable_regs |= thumb1_prologue_unused_call_clobbered_lo_regs (); ++ ++ /* Normally, LR can be used as a scratch register once it has been ++ saved; but if the function examines its own return address then ++ the value is still live and we need to avoid using it. */ ++ bool return_addr_live ++ = REGNO_REG_SET_P (df_get_live_out (ENTRY_BLOCK_PTR_FOR_FN (cfun)), ++ LR_REGNUM); ++ ++ if (lr_needs_saving || return_addr_live) + pushable_regs &= ~(1 << LR_REGNUM); + + if (pushable_regs == 0) +@@ -25236,6 +25289,11 @@ + push_mask |= 1 << LR_REGNUM; + real_regs_mask |= 1 << LR_REGNUM; + lr_needs_saving = false; ++ /* If the return address is not live at this point, we ++ can add LR to the list of registers that we can use ++ for pushes. */ ++ if (!return_addr_live) ++ pushable_regs |= 1 << LR_REGNUM; + } + + insn = thumb1_emit_multi_reg_push (push_mask, real_regs_mask); Index: gcc/config/arm/arm.h =================================================================== --- a/src/gcc/config/arm/arm.h (.../tags/gcc_8_3_0_release) @@ -52580,7 +60835,115 @@ =================================================================== --- a/src/gcc/config/arm/arm.md (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/arm/arm.md (.../branches/gcc-8-branch) -@@ -5976,52 +5976,29 @@ +@@ -4448,62 +4448,78 @@ + ; ARMv6+ unaligned load/store instructions (used for packed structure accesses). + + (define_insn "unaligned_loadsi" +- [(set (match_operand:SI 0 "s_register_operand" "=l,r") +- (unspec:SI [(match_operand:SI 1 "memory_operand" "Uw,m")] ++ [(set (match_operand:SI 0 "s_register_operand" "=l,l,r") ++ (unspec:SI [(match_operand:SI 1 "memory_operand" "m,Uw,m")] + UNSPEC_UNALIGNED_LOAD))] + "unaligned_access" +- "ldr%?\t%0, %1\t@ unaligned" +- [(set_attr "arch" "t2,any") +- (set_attr "length" "2,4") +- (set_attr "predicable" "yes") +- (set_attr "predicable_short_it" "yes,no") ++ "@ ++ ldr\t%0, %1\t@ unaligned ++ ldr%?\t%0, %1\t@ unaligned ++ ldr%?\t%0, %1\t@ unaligned" ++ [(set_attr "arch" "t1,t2,32") ++ (set_attr "length" "2,2,4") ++ (set_attr "predicable" "no,yes,yes") ++ (set_attr "predicable_short_it" "no,yes,no") + (set_attr "type" "load_4")]) + ++;; The 16-bit Thumb1 variant of ldrsh requires two registers in the ++;; address (there's no immediate format). That's tricky to support ++;; here and we don't really need this pattern for that case, so only ++;; enable for 32-bit ISAs. + (define_insn "unaligned_loadhis" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (sign_extend:SI + (unspec:HI [(match_operand:HI 1 "memory_operand" "Uh")] + UNSPEC_UNALIGNED_LOAD)))] +- "unaligned_access" ++ "unaligned_access && TARGET_32BIT" + "ldrsh%?\t%0, %1\t@ unaligned" + [(set_attr "predicable" "yes") + (set_attr "type" "load_byte")]) + + (define_insn "unaligned_loadhiu" +- [(set (match_operand:SI 0 "s_register_operand" "=l,r") ++ [(set (match_operand:SI 0 "s_register_operand" "=l,l,r") + (zero_extend:SI +- (unspec:HI [(match_operand:HI 1 "memory_operand" "Uw,m")] ++ (unspec:HI [(match_operand:HI 1 "memory_operand" "m,Uw,m")] + UNSPEC_UNALIGNED_LOAD)))] + "unaligned_access" +- "ldrh%?\t%0, %1\t@ unaligned" +- [(set_attr "arch" "t2,any") +- (set_attr "length" "2,4") +- (set_attr "predicable" "yes") +- (set_attr "predicable_short_it" "yes,no") ++ "@ ++ ldrh\t%0, %1\t@ unaligned ++ ldrh%?\t%0, %1\t@ unaligned ++ ldrh%?\t%0, %1\t@ unaligned" ++ [(set_attr "arch" "t1,t2,32") ++ (set_attr "length" "2,2,4") ++ (set_attr "predicable" "no,yes,yes") ++ (set_attr "predicable_short_it" "no,yes,no") + (set_attr "type" "load_byte")]) + + (define_insn "unaligned_storesi" +- [(set (match_operand:SI 0 "memory_operand" "=Uw,m") +- (unspec:SI [(match_operand:SI 1 "s_register_operand" "l,r")] ++ [(set (match_operand:SI 0 "memory_operand" "=m,Uw,m") ++ (unspec:SI [(match_operand:SI 1 "s_register_operand" "l,l,r")] + UNSPEC_UNALIGNED_STORE))] + "unaligned_access" +- "str%?\t%1, %0\t@ unaligned" +- [(set_attr "arch" "t2,any") +- (set_attr "length" "2,4") +- (set_attr "predicable" "yes") +- (set_attr "predicable_short_it" "yes,no") ++ "@ ++ str\t%1, %0\t@ unaligned ++ str%?\t%1, %0\t@ unaligned ++ str%?\t%1, %0\t@ unaligned" ++ [(set_attr "arch" "t1,t2,32") ++ (set_attr "length" "2,2,4") ++ (set_attr "predicable" "no,yes,yes") ++ (set_attr "predicable_short_it" "no,yes,no") + (set_attr "type" "store_4")]) + + (define_insn "unaligned_storehi" +- [(set (match_operand:HI 0 "memory_operand" "=Uw,m") +- (unspec:HI [(match_operand:HI 1 "s_register_operand" "l,r")] ++ [(set (match_operand:HI 0 "memory_operand" "=m,Uw,m") ++ (unspec:HI [(match_operand:HI 1 "s_register_operand" "l,l,r")] + UNSPEC_UNALIGNED_STORE))] + "unaligned_access" +- "strh%?\t%1, %0\t@ unaligned" +- [(set_attr "arch" "t2,any") +- (set_attr "length" "2,4") +- (set_attr "predicable" "yes") +- (set_attr "predicable_short_it" "yes,no") ++ "@ ++ strh\t%1, %0\t@ unaligned ++ strh%?\t%1, %0\t@ unaligned ++ strh%?\t%1, %0\t@ unaligned" ++ [(set_attr "arch" "t1,t2,32") ++ (set_attr "length" "2,2,4") ++ (set_attr "predicable" "no,yes,yes") ++ (set_attr "predicable_short_it" "no,yes,no") + (set_attr "type" "store_4")]) + + +@@ -5976,52 +5992,29 @@ } } @@ -52743,7 +61106,7 @@ #ifndef CROSS_DIRECTORY_STRUCTURE #include #include "xregex.h" -@@ -114,12 +199,13 @@ +@@ -114,16 +199,39 @@ if (new_flag != NULL) { @@ -52763,7 +61126,41 @@ } return new_flag; } -@@ -175,7 +261,7 @@ + ++/* See if we can find the sysroot from the SDKROOT environment variable. */ ++ ++static const char * ++maybe_get_sysroot_from_sdkroot () ++{ ++ const char *maybe_sysroot = getenv ("SDKROOT"); ++ ++ /* We'll use the same rules as the clang driver, for compatibility. ++ 1) The path must be absolute ++ 2) Ignore "/", that is the default anyway and we do not want the ++ sysroot semantics to be applied to it. ++ 3) It must exist (actually, we'll check it's readable too). */ ++ ++ if (maybe_sysroot == NULL ++ || *maybe_sysroot != '/' ++ || strlen (maybe_sysroot) == 1 ++ || access (maybe_sysroot, R_OK) == -1) ++ return NULL; ++ ++ return xstrndup (maybe_sysroot, strlen (maybe_sysroot)); ++} ++ + /* Translate -filelist and -framework options in *DECODED_OPTIONS + (size *DECODED_OPTIONS_COUNT) to use -Xlinker so that they are + considered to be linker inputs in the case that no other inputs are +@@ -148,6 +256,7 @@ + bool appendM64 = false; + const char *vers_string = NULL; + bool seen_version_min = false; ++ bool seen_sysroot_p = false; + + for (i = 1; i < *decoded_options_count; i++) + { +@@ -175,7 +284,7 @@ if (*decoded_options_count > i) { memmove (*decoded_options + i, *decoded_options + i + 1, @@ -52772,7 +61169,7 @@ * sizeof (struct cl_decoded_option))); } --i; -@@ -209,7 +295,24 @@ +@@ -209,8 +318,30 @@ case OPT_mmacosx_version_min_: seen_version_min = true; @@ -52796,26 +61193,48 @@ + --*decoded_options_count; + break; ++ case OPT__sysroot_: ++ case OPT_isysroot: ++ seen_sysroot_p = true; ++ break; ++ default: break; -@@ -276,22 +379,20 @@ - so that we can figure out the mechanism and source for the sysroot to - be used. */ - if (! seen_version_min && *decoded_options_count > 1) -- { + } +@@ -272,26 +403,40 @@ + &(*decoded_options)[*decoded_options_count - 1]); + } + +- /* We will need to know the OS X version we're trying to build for here +- so that we can figure out the mechanism and source for the sysroot to +- be used. */ +- if (! seen_version_min && *decoded_options_count > 1) ++ if (! seen_sysroot_p) + { - /* Not set by the User, try to figure it out. */ - vers_string = darwin_default_min_version (); - if (vers_string != NULL) -- { -- ++*decoded_options_count; -- *decoded_options = XRESIZEVEC (struct cl_decoded_option, -- *decoded_options, -- *decoded_options_count); ++ /* We will pick up an SDKROOT if we didn't specify a sysroot and treat ++ it as overriding any configure-time --with-sysroot. */ ++ const char *sdkroot = maybe_get_sysroot_from_sdkroot (); ++ if (sdkroot) + { + ++*decoded_options_count; + *decoded_options = XRESIZEVEC (struct cl_decoded_option, + *decoded_options, + *decoded_options_count); - generate_option (OPT_mmacosx_version_min_, vers_string, 1, CL_DRIVER, - &(*decoded_options)[*decoded_options_count - 1]); -- } -- } ++ generate_option (OPT__sysroot_, sdkroot, 1, CL_DRIVER, ++ &(*decoded_options)[*decoded_options_count - 1]); + } + } - /* Create and push the major version for assemblers that need it. */ ++ ++ /* We will need to know the OS X version we're trying to build for here ++ so that we can figure out the mechanism and source for the sysroot to ++ be used. */ ++ if (! seen_version_min && *decoded_options_count > 1) + /* Not set by the User, try to figure it out. */ + vers_string = darwin_default_min_version (); + @@ -52939,6 +61358,98 @@ /* Prevent the insns above from being scheduled into the delay slot of the interspace jump because the space register could change. */ emit_insn (gen_blockage ()); +@@ -10085,23 +10091,55 @@ + (set_attr "length" "4,16")]) + + ;; PA 2.0 hardware supports out-of-order execution of loads and stores, so +-;; we need a memory barrier to enforce program order for memory references. +-;; Since we want PA 1.x code to be PA 2.0 compatible, we also need the +-;; barrier when generating PA 1.x code. ++;; we need memory barriers to enforce program order for memory references ++;; when the TLB and PSW O bits are not set. We assume all PA 2.0 systems ++;; are weakly ordered since neither HP-UX or Linux set the PSW O bit. Since ++;; we want PA 1.x code to be PA 2.0 compatible, we also need barriers when ++;; generating PA 1.x code even though all PA 1.x systems are strongly ordered. + ++;; When barriers are needed, we use a strongly ordered ldcw instruction as ++;; the barrier. Most PA 2.0 targets are cache coherent. In that case, we ++;; can use the coherent cache control hint and avoid aligning the ldcw ++;; address. In spite of its description, it is not clear that the sync ++;; instruction works as a barrier. ++ + (define_expand "memory_barrier" +- [(set (match_dup 0) +- (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))] ++ [(parallel ++ [(set (match_dup 0) (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) ++ (clobber (match_dup 1))])] + "" + { +- operands[0] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode)); ++ /* We don't need a barrier if the target uses ordered memory references. */ ++ if (TARGET_ORDERED) ++ FAIL; ++ operands[1] = gen_reg_rtx (Pmode); ++ operands[0] = gen_rtx_MEM (BLKmode, operands[1]); + MEM_VOLATILE_P (operands[0]) = 1; + }) + +-(define_insn "*memory_barrier" ++(define_insn "*memory_barrier_coherent" + [(set (match_operand:BLK 0 "" "") +- (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER))] ++ (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) ++ (clobber (match_operand 1 "pmode_register_operand" "=r"))] ++ "TARGET_PA_20 && TARGET_COHERENT_LDCW" ++ "ldcw,co 0(%%sp),%1" ++ [(set_attr "type" "binary") ++ (set_attr "length" "4")]) ++ ++(define_insn "*memory_barrier_64" ++ [(set (match_operand:BLK 0 "" "") ++ (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) ++ (clobber (match_operand 1 "pmode_register_operand" "=&r"))] ++ "TARGET_64BIT" ++ "ldo 15(%%sp),%1\n\tdepd %%r0,63,3,%1\n\tldcw 0(%1),%1" ++ [(set_attr "type" "binary") ++ (set_attr "length" "12")]) ++ ++(define_insn "*memory_barrier_32" ++ [(set (match_operand:BLK 0 "" "") ++ (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) ++ (clobber (match_operand 1 "pmode_register_operand" "=&r"))] + "" +- "sync" ++ "ldo 15(%%sp),%1\n\t{dep|depw} %%r0,31,3,%1\n\tldcw 0(%1),%1" + [(set_attr "type" "binary") +- (set_attr "length" "4")]) ++ (set_attr "length" "12")]) +Index: gcc/config/pa/pa.opt +=================================================================== +--- a/src/gcc/config/pa/pa.opt (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/pa/pa.opt (.../branches/gcc-8-branch) +@@ -45,6 +45,10 @@ + Target Report Mask(CALLER_COPIES) + Caller copies function arguments passed by hidden reference. + ++mcoherent-ldcw ++Target Report Var(TARGET_COHERENT_LDCW) Init(1) ++Use ldcw/ldcd coherent cache-control hint. ++ + mdisable-fpregs + Target Report Mask(DISABLE_FPREGS) + Disable FP regs. +@@ -90,6 +94,10 @@ + Target RejectNegative Report Mask(NO_SPACE_REGS) + Disable space regs. + ++mordered ++Target Report Var(TARGET_ORDERED) Init(0) ++Assume memory references are ordered and barriers are not needed. ++ + mpa-risc-1-0 + Target RejectNegative + Generate PA1.0 code. Index: gcc/config/pa/pa-protos.h =================================================================== --- a/src/gcc/config/pa/pa-protos.h (.../tags/gcc_8_3_0_release) @@ -52954,7 +61465,7 @@ =================================================================== --- a/src/gcc/config/pa/pa.c (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/pa/pa.c (.../branches/gcc-8-branch) -@@ -118,7 +118,8 @@ +@@ -118,11 +118,11 @@ static rtx pa_function_value (const_tree, const_tree, bool); static rtx pa_libcall_value (machine_mode, const_rtx); static bool pa_function_value_regno_p (const unsigned int); @@ -52964,7 +61475,11 @@ static void update_total_code_bytes (unsigned int); static void pa_output_function_epilogue (FILE *); static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int); -@@ -263,8 +264,6 @@ +-static int pa_adjust_priority (rtx_insn *, int); + static int pa_issue_rate (void); + static int pa_reloc_rw_mask (void); + static void pa_som_asm_init_sections (void) ATTRIBUTE_UNUSED; +@@ -263,8 +263,6 @@ #undef TARGET_ASM_INTEGER #define TARGET_ASM_INTEGER pa_assemble_integer @@ -52973,7 +61488,16 @@ #undef TARGET_ASM_FUNCTION_EPILOGUE #define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue -@@ -3842,16 +3841,10 @@ +@@ -280,8 +278,6 @@ + + #undef TARGET_SCHED_ADJUST_COST + #define TARGET_SCHED_ADJUST_COST pa_adjust_cost +-#undef TARGET_SCHED_ADJUST_PRIORITY +-#define TARGET_SCHED_ADJUST_PRIORITY pa_adjust_priority + #undef TARGET_SCHED_ISSUE_RATE + #define TARGET_SCHED_ISSUE_RATE pa_issue_rate + +@@ -3842,16 +3838,10 @@ & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1)); } @@ -52993,7 +61517,7 @@ { /* The function's label and associated .PROC must never be separated and must be output *after* any profiling declarations -@@ -3897,10 +3890,25 @@ +@@ -3897,10 +3887,25 @@ fprintf (file, ",ENTRY_FR=%d", fr_saved + 11); fputs ("\n\t.ENTRY\n", file); @@ -53019,7 +61543,7 @@ void pa_expand_prologue (void) { -@@ -4569,10 +4577,6 @@ +@@ -4569,10 +4574,6 @@ void hppa_profile_hook (int label_no) { @@ -53030,7 +61554,7 @@ rtx_code_label *label_rtx = gen_label_rtx (); int reg_parm_stack_space = REG_PARM_STACK_SPACE (NULL_TREE); rtx arg_bytes, begin_label_rtx, mcount, sym; -@@ -4604,18 +4608,13 @@ +@@ -4604,18 +4605,13 @@ if (!use_mcount_pcrel_call) { /* The address of the function is loaded into %r25 with an instruction- @@ -53054,7 +61578,246 @@ } if (!NO_DEFERRED_PROFILE_COUNTERS) -@@ -10039,10 +10038,11 @@ +@@ -4992,37 +4988,6 @@ + } + } + +-/* Adjust scheduling priorities. We use this to try and keep addil +- and the next use of %r1 close together. */ +-static int +-pa_adjust_priority (rtx_insn *insn, int priority) +-{ +- rtx set = single_set (insn); +- rtx src, dest; +- if (set) +- { +- src = SET_SRC (set); +- dest = SET_DEST (set); +- if (GET_CODE (src) == LO_SUM +- && symbolic_operand (XEXP (src, 1), VOIDmode) +- && ! read_only_operand (XEXP (src, 1), VOIDmode)) +- priority >>= 3; +- +- else if (GET_CODE (src) == MEM +- && GET_CODE (XEXP (src, 0)) == LO_SUM +- && symbolic_operand (XEXP (XEXP (src, 0), 1), VOIDmode) +- && ! read_only_operand (XEXP (XEXP (src, 0), 1), VOIDmode)) +- priority >>= 1; +- +- else if (GET_CODE (dest) == MEM +- && GET_CODE (XEXP (dest, 0)) == LO_SUM +- && symbolic_operand (XEXP (XEXP (dest, 0), 1), VOIDmode) +- && ! read_only_operand (XEXP (XEXP (dest, 0), 1), VOIDmode)) +- priority >>= 3; +- } +- return priority; +-} +- + /* The 700 can only issue a single insn at a time. + The 7XXX processors can issue two insns at a time. + The 8000 can issue 4 insns at a time. */ +@@ -7888,7 +7853,7 @@ + + /* 64-bit plabel sequence. */ + else if (TARGET_64BIT && !local_call) +- length += sibcall ? 28 : 24; ++ length += 24; + + /* non-pic long absolute branch sequence. */ + else if ((TARGET_LONG_ABS_CALL || local_call) && !flag_pic) +@@ -7960,12 +7925,9 @@ + xoperands[0] = pa_get_deferred_plabel (call_dest); + xoperands[1] = gen_label_rtx (); + +- /* If this isn't a sibcall, we put the load of %r27 into the +- delay slot. We can't do this in a sibcall as we don't +- have a second call-clobbered scratch register available. +- We don't need to do anything when generating fast indirect +- calls. */ +- if (seq_length != 0 && !sibcall) ++ /* Put the load of %r27 into the delay slot. We don't need to ++ do anything when generating fast indirect calls. */ ++ if (seq_length != 0) + { + final_scan_insn (NEXT_INSN (insn), asm_out_file, + optimize, 0, NULL); +@@ -7972,26 +7934,15 @@ + + /* Now delete the delay insn. */ + SET_INSN_DELETED (NEXT_INSN (insn)); +- seq_length = 0; + } + + output_asm_insn ("addil LT'%0,%%r27", xoperands); + output_asm_insn ("ldd RT'%0(%%r1),%%r1", xoperands); + output_asm_insn ("ldd 0(%%r1),%%r1", xoperands); +- +- if (sibcall) +- { +- output_asm_insn ("ldd 24(%%r1),%%r27", xoperands); +- output_asm_insn ("ldd 16(%%r1),%%r1", xoperands); +- output_asm_insn ("bve (%%r1)", xoperands); +- } +- else +- { +- output_asm_insn ("ldd 16(%%r1),%%r2", xoperands); +- output_asm_insn ("bve,l (%%r2),%%r2", xoperands); +- output_asm_insn ("ldd 24(%%r1),%%r27", xoperands); +- seq_length = 1; +- } ++ output_asm_insn ("ldd 16(%%r1),%%r2", xoperands); ++ output_asm_insn ("bve,l (%%r2),%%r2", xoperands); ++ output_asm_insn ("ldd 24(%%r1),%%r27", xoperands); ++ seq_length = 1; + } + else + { +@@ -8084,20 +8035,22 @@ + { + output_asm_insn ("addil LT'%0,%%r19", xoperands); + output_asm_insn ("ldw RT'%0(%%r1),%%r1", xoperands); +- output_asm_insn ("ldw 0(%%r1),%%r1", xoperands); ++ output_asm_insn ("ldw 0(%%r1),%%r22", xoperands); + } + else + { + output_asm_insn ("addil LR'%0-$global$,%%r27", + xoperands); +- output_asm_insn ("ldw RR'%0-$global$(%%r1),%%r1", ++ output_asm_insn ("ldw RR'%0-$global$(%%r1),%%r22", + xoperands); + } + +- output_asm_insn ("bb,>=,n %%r1,30,.+16", xoperands); +- output_asm_insn ("depi 0,31,2,%%r1", xoperands); +- output_asm_insn ("ldw 4(%%sr0,%%r1),%%r19", xoperands); +- output_asm_insn ("ldw 0(%%sr0,%%r1),%%r1", xoperands); ++ output_asm_insn ("bb,>=,n %%r22,30,.+16", xoperands); ++ output_asm_insn ("depi 0,31,2,%%r22", xoperands); ++ /* Should this be an ordered load to ensure the target ++ address is loaded before the global pointer? */ ++ output_asm_insn ("ldw 0(%%r22),%%r1", xoperands); ++ output_asm_insn ("ldw 4(%%r22),%%r19", xoperands); + + if (!sibcall && !TARGET_PA_20) + { +@@ -8190,10 +8143,6 @@ + if (TARGET_PORTABLE_RUNTIME) + return 16; + +- /* Inline version of $$dyncall. */ +- if ((TARGET_NO_SPACE_REGS || TARGET_PA_20) && !optimize_size) +- return 20; +- + if (!TARGET_LONG_CALLS + && ((TARGET_PA_20 && !TARGET_SOM && distance < 7600000) + || distance < MAX_PCREL17F_OFFSET)) +@@ -8203,13 +8152,16 @@ + if (!flag_pic) + return 12; + +- /* Inline version of $$dyncall. */ +- if (TARGET_NO_SPACE_REGS || TARGET_PA_20) +- return 20; +- ++ /* Inline versions of $$dyncall. */ + if (!optimize_size) +- return 36; ++ { ++ if (TARGET_NO_SPACE_REGS) ++ return 28; + ++ if (TARGET_PA_20) ++ return 32; ++ } ++ + /* Long PIC pc-relative call. */ + return 20; + } +@@ -8246,22 +8198,6 @@ + return "blr %%r0,%%r2\n\tbv,n %%r0(%%r31)"; + } + +- /* Maybe emit a fast inline version of $$dyncall. */ +- if ((TARGET_NO_SPACE_REGS || TARGET_PA_20) && !optimize_size) +- { +- output_asm_insn ("bb,>=,n %%r22,30,.+12\n\t" +- "ldw 2(%%r22),%%r19\n\t" +- "ldw -2(%%r22),%%r22", xoperands); +- pa_output_arg_descriptor (insn); +- if (TARGET_NO_SPACE_REGS) +- { +- if (TARGET_PA_20) +- return "bve,l,n (%%r22),%%r2\n\tnop"; +- return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2"; +- } +- return "bve,l (%%r22),%%r2\n\tstw %%r2,-24(%%sp)"; +- } +- + /* Now the normal case -- we can reach $$dyncall directly or + we're sure that we can get there via a long-branch stub. + +@@ -8290,35 +8226,40 @@ + return "ble R'$$dyncall(%%sr4,%%r2)\n\tcopy %%r31,%%r2"; + } + +- /* Maybe emit a fast inline version of $$dyncall. The long PIC +- pc-relative call sequence is five instructions. The inline PA 2.0 +- version of $$dyncall is also five instructions. The PA 1.X versions +- are longer but still an overall win. */ +- if (TARGET_NO_SPACE_REGS || TARGET_PA_20 || !optimize_size) ++ /* The long PIC pc-relative call sequence is five instructions. So, ++ let's use an inline version of $$dyncall when the calling sequence ++ has a roughly similar number of instructions and we are not optimizing ++ for size. We need two instructions to load the return pointer plus ++ the $$dyncall implementation. */ ++ if (!optimize_size) + { +- output_asm_insn ("bb,>=,n %%r22,30,.+12\n\t" +- "ldw 2(%%r22),%%r19\n\t" +- "ldw -2(%%r22),%%r22", xoperands); + if (TARGET_NO_SPACE_REGS) + { + pa_output_arg_descriptor (insn); +- if (TARGET_PA_20) +- return "bve,l,n (%%r22),%%r2\n\tnop"; +- return "ble 0(%%sr4,%%r22)\n\tcopy %%r31,%%r2"; ++ output_asm_insn ("bl .+8,%%r2\n\t" ++ "ldo 20(%%r2),%%r2\n\t" ++ "extru,<> %%r22,30,1,%%r0\n\t" ++ "bv,n %%r0(%%r22)\n\t" ++ "ldw -2(%%r22),%%r21\n\t" ++ "bv %%r0(%%r21)\n\t" ++ "ldw 2(%%r22),%%r19", xoperands); ++ return ""; + } + if (TARGET_PA_20) + { + pa_output_arg_descriptor (insn); +- return "bve,l (%%r22),%%r2\n\tstw %%r2,-24(%%sp)"; ++ output_asm_insn ("bl .+8,%%r2\n\t" ++ "ldo 24(%%r2),%%r2\n\t" ++ "stw %%r2,-24(%%sp)\n\t" ++ "extru,<> %r22,30,1,%%r0\n\t" ++ "bve,n (%%r22)\n\t" ++ "ldw -2(%%r22),%%r21\n\t" ++ "bve (%%r21)\n\t" ++ "ldw 2(%%r22),%%r19", xoperands); ++ return ""; + } +- output_asm_insn ("bl .+8,%%r2\n\t" +- "ldo 16(%%r2),%%r2\n\t" +- "ldsid (%%r22),%%r1\n\t" +- "mtsp %%r1,%%sr0", xoperands); +- pa_output_arg_descriptor (insn); +- return "be 0(%%sr0,%%r22)\n\tstw %%r2,-24(%%sp)"; + } +- ++ + /* We need a long PIC call to $$dyncall. */ + xoperands[0] = gen_rtx_SYMBOL_REF (Pmode, "$$dyncall"); + xoperands[1] = gen_rtx_REG (Pmode, 2); +@@ -10039,10 +9980,11 @@ /* There is no way to load QImode or HImode values directly from memory to a FP register. SImode loads to the FP registers are not zero extended. On the 64-bit target, this conflicts with the definition @@ -53069,7 +61832,126 @@ /* TARGET_HARD_REGNO_MODE_OK places modes with sizes larger than a word in specific sets of registers. Thus, we cannot allow changing -@@ -10234,7 +10234,7 @@ +@@ -10076,7 +10018,7 @@ + + /* Length in units of the trampoline instruction code. */ + +-#define TRAMPOLINE_CODE_SIZE (TARGET_64BIT ? 24 : (TARGET_PA_20 ? 32 : 40)) ++#define TRAMPOLINE_CODE_SIZE (TARGET_64BIT ? 24 : (TARGET_PA_20 ? 36 : 48)) + + + /* Output assembler code for a block containing the constant parts +@@ -10097,27 +10039,46 @@ + { + if (!TARGET_64BIT) + { +- fputs ("\tldw 36(%r22),%r21\n", f); +- fputs ("\tbb,>=,n %r21,30,.+16\n", f); +- if (ASSEMBLER_DIALECT == 0) +- fputs ("\tdepi 0,31,2,%r21\n", f); +- else +- fputs ("\tdepwi 0,31,2,%r21\n", f); +- fputs ("\tldw 4(%r21),%r19\n", f); +- fputs ("\tldw 0(%r21),%r21\n", f); + if (TARGET_PA_20) + { +- fputs ("\tbve (%r21)\n", f); +- fputs ("\tldw 40(%r22),%r29\n", f); ++ fputs ("\tmfia %r20\n", f); ++ fputs ("\tldw 48(%r20),%r22\n", f); ++ fputs ("\tcopy %r22,%r21\n", f); ++ fputs ("\tbb,>=,n %r22,30,.+16\n", f); ++ fputs ("\tdepwi 0,31,2,%r22\n", f); ++ fputs ("\tldw 0(%r22),%r21\n", f); ++ fputs ("\tldw 4(%r22),%r19\n", f); ++ fputs ("\tbve (%r21)\n", f); ++ fputs ("\tldw 52(%r1),%r29\n", f); + fputs ("\t.word 0\n", f); + fputs ("\t.word 0\n", f); ++ fputs ("\t.word 0\n", f); + } + else + { ++ if (ASSEMBLER_DIALECT == 0) ++ { ++ fputs ("\tbl .+8,%r20\n", f); ++ fputs ("\tdepi 0,31,2,%r20\n", f); ++ } ++ else ++ { ++ fputs ("\tb,l .+8,%r20\n", f); ++ fputs ("\tdepwi 0,31,2,%r20\n", f); ++ } ++ fputs ("\tldw 40(%r20),%r22\n", f); ++ fputs ("\tcopy %r22,%r21\n", f); ++ fputs ("\tbb,>=,n %r22,30,.+16\n", f); ++ if (ASSEMBLER_DIALECT == 0) ++ fputs ("\tdepi 0,31,2,%r22\n", f); ++ else ++ fputs ("\tdepwi 0,31,2,%r22\n", f); ++ fputs ("\tldw 0(%r22),%r21\n", f); ++ fputs ("\tldw 4(%r22),%r19\n", f); + fputs ("\tldsid (%r21),%r1\n", f); + fputs ("\tmtsp %r1,%sr0\n", f); +- fputs ("\tbe 0(%sr0,%r21)\n", f); +- fputs ("\tldw 40(%r22),%r29\n", f); ++ fputs ("\tbe 0(%sr0,%r21)\n", f); ++ fputs ("\tldw 44(%r20),%r29\n", f); + } + fputs ("\t.word 0\n", f); + fputs ("\t.word 0\n", f); +@@ -10131,11 +10092,11 @@ + fputs ("\t.dword 0\n", f); + fputs ("\t.dword 0\n", f); + fputs ("\tmfia %r31\n", f); +- fputs ("\tldd 24(%r31),%r1\n", f); +- fputs ("\tldd 24(%r1),%r27\n", f); +- fputs ("\tldd 16(%r1),%r1\n", f); ++ fputs ("\tldd 24(%r31),%r27\n", f); ++ fputs ("\tldd 32(%r31),%r31\n", f); ++ fputs ("\tldd 16(%r27),%r1\n", f); + fputs ("\tbve (%r1)\n", f); +- fputs ("\tldd 32(%r31),%r31\n", f); ++ fputs ("\tldd 24(%r27),%r27\n", f); + fputs ("\t.dword 0 ; fptr\n", f); + fputs ("\t.dword 0 ; static link\n", f); + } +@@ -10145,10 +10106,10 @@ + FNADDR is an RTX for the address of the function's pure code. + CXT is an RTX for the static chain value for the function. + +- Move the function address to the trampoline template at offset 36. +- Move the static chain value to trampoline template at offset 40. +- Move the trampoline address to trampoline template at offset 44. +- Move r19 to trampoline template at offset 48. The latter two ++ Move the function address to the trampoline template at offset 48. ++ Move the static chain value to trampoline template at offset 52. ++ Move the trampoline address to trampoline template at offset 56. ++ Move r19 to trampoline template at offset 60. The latter two + words create a plabel for the indirect call to the trampoline. + + A similar sequence is used for the 64-bit port but the plabel is +@@ -10174,15 +10135,15 @@ + + if (!TARGET_64BIT) + { +- tmp = adjust_address (m_tramp, Pmode, 36); ++ tmp = adjust_address (m_tramp, Pmode, 48); + emit_move_insn (tmp, fnaddr); +- tmp = adjust_address (m_tramp, Pmode, 40); ++ tmp = adjust_address (m_tramp, Pmode, 52); + emit_move_insn (tmp, chain_value); + + /* Create a fat pointer for the trampoline. */ +- tmp = adjust_address (m_tramp, Pmode, 44); ++ tmp = adjust_address (m_tramp, Pmode, 56); + emit_move_insn (tmp, r_tramp); +- tmp = adjust_address (m_tramp, Pmode, 48); ++ tmp = adjust_address (m_tramp, Pmode, 60); + emit_move_insn (tmp, gen_rtx_REG (Pmode, 19)); + + /* fdc and fic only use registers for the address to flush, +@@ -10234,7 +10195,7 @@ } #ifdef HAVE_ENABLE_EXECUTE_STACK @@ -53078,6 +61960,22 @@ LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode); #endif } +@@ -10241,13 +10202,13 @@ + + /* Perform any machine-specific adjustment in the address of the trampoline. + ADDR contains the address that was passed to pa_trampoline_init. +- Adjust the trampoline address to point to the plabel at offset 44. */ ++ Adjust the trampoline address to point to the plabel at offset 56. */ + + static rtx + pa_trampoline_adjust_address (rtx addr) + { + if (!TARGET_64BIT) +- addr = memory_address (Pmode, plus_constant (Pmode, addr, 46)); ++ addr = memory_address (Pmode, plus_constant (Pmode, addr, 58)); + return addr; + } + Index: gcc/config/pa/pa-linux.h =================================================================== --- a/src/gcc/config/pa/pa-linux.h (.../tags/gcc_8_3_0_release) @@ -53110,17 +62008,69 @@ =================================================================== --- a/src/gcc/config/pa/pa.h (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/pa/pa.h (.../branches/gcc-8-branch) -@@ -1302,3 +1302,6 @@ - (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000) +@@ -689,7 +689,7 @@ + + /* Length in units of the trampoline for entering a nested function. */ + +-#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 52) ++#define TRAMPOLINE_SIZE (TARGET_64BIT ? 72 : 64) + + /* Alignment required by the trampoline. */ + +@@ -1293,12 +1293,14 @@ + #endif + + /* The maximum offset in bytes for a PA 1.X pc-relative call to the +- head of the preceding stub table. The selected offsets have been +- chosen so that approximately one call stub is allocated for every +- 86.7 instructions. A long branch stub is two instructions when +- not generating PIC code. For HP-UX and ELF targets, PIC stubs are +- seven and four instructions, respectively. */ +-#define MAX_PCREL17F_OFFSET \ +- (flag_pic ? (TARGET_HPUX ? 198164 : 221312) : 240000) ++ head of the preceding stub table. A long branch stub is two or three ++ instructions for non-PIC and PIC, respectively. Import stubs are ++ seven and five instructions for HP-UX and ELF targets, respectively. ++ The default stub group size for ELF targets is 217856 bytes. ++ FIXME: We need an option to set the maximum offset. */ ++#define MAX_PCREL17F_OFFSET (TARGET_HPUX ? 198164 : 217856) #define NEED_INDICATE_EXEC_STACK 0 + +/* Output default function prologue for hpux. */ +#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue +Index: gcc/config/darwin9.h +=================================================================== +--- a/src/gcc/config/darwin9.h (.../tags/gcc_8_3_0_release) ++++ b/src/gcc/config/darwin9.h (.../branches/gcc-8-branch) +@@ -35,12 +35,6 @@ + /* Tell collect2 to run dsymutil for us as necessary. */ + #define COLLECT_RUN_DSYMUTIL 1 + +-#undef DARWIN_PIE_SPEC +-#define DARWIN_PIE_SPEC \ +- "%{fpie|pie|fPIE: \ +- %{mdynamic-no-pic: %n'-mdynamic-no-pic' overrides '-pie', '-fpie' or '-fPIE'; \ +- :-pie}}" +- + /* Only ask as for debug data if the debug style is stabs (since as doesn't + yet generate dwarf.) */ + Index: gcc/config/mips/mips.md =================================================================== --- a/src/gcc/config/mips/mips.md (.../tags/gcc_8_3_0_release) +++ b/src/gcc/config/mips/mips.md (.../branches/gcc-8-branch) +@@ -5772,8 +5772,8 @@ + "ISA_HAS_ROR" + { + if (CONST_INT_P (operands[2])) +- gcc_assert (INTVAL (operands[2]) >= 0 +- && INTVAL (operands[2]) < GET_MODE_BITSIZE (mode)); ++ operands[2] = GEN_INT (INTVAL (operands[2]) ++ & (GET_MODE_BITSIZE (mode) - 1)); + + return "ror\t%0,%1,%2"; + } @@ -7502,7 +7502,7 @@ ;; __builtin_mips_get_fcsr: move the FCSR into operand 0. (define_expand "mips_get_fcsr" @@ -53792,7 +62742,23 @@ =================================================================== --- a/src/libgfortran/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/libgfortran/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,28 @@ +@@ -1,3 +1,44 @@ ++2019-11-26 Jerry DeLisle ++ ++ Backport from mainline ++ PR fortran/92100 ++ io/transfer.c (data_transfer_init): Use fbuf_reset ++ instead of fbuf_flush before the seek. Note that fbuf_reset ++ calls fbuf_flush and adjusts fbuf pointers. ++ ++2019-11-25 Thomas Koenig ++ Harald Anlauf ++ ++ Backport from trunk ++ PR fortran/92569 ++ * io/transfer.c (transfer_array_inner): If position is ++ at AFTER_ENDFILE in current unit, return from data loop. ++ +2019-08-13 Janne Blomqvist + + Partial backport from trunk @@ -53848,6 +62814,100 @@ free (path); } #endif +Index: libgfortran/io/transfer.c +=================================================================== +--- a/src/libgfortran/io/transfer.c (.../tags/gcc_8_3_0_release) ++++ b/src/libgfortran/io/transfer.c (.../branches/gcc-8-branch) +@@ -2493,26 +2493,62 @@ + + data = GFC_DESCRIPTOR_DATA (desc); + +- while (data) ++ /* When reading, we need to check endfile conditions so we do not miss ++ an END=label. Make this separate so we do not have an extra test ++ in a tight loop when it is not needed. */ ++ ++ if (dtp->u.p.current_unit && dtp->u.p.mode == READING) + { +- dtp->u.p.transfer (dtp, iotype, data, kind, size, tsize); +- data += stride0 * tsize; +- count[0] += tsize; +- n = 0; +- while (count[n] == extent[n]) ++ while (data) + { +- count[n] = 0; +- data -= stride[n] * extent[n]; +- n++; +- if (n == rank) ++ if (unlikely (dtp->u.p.current_unit->endfile == AFTER_ENDFILE)) ++ return; ++ ++ dtp->u.p.transfer (dtp, iotype, data, kind, size, tsize); ++ data += stride0 * tsize; ++ count[0] += tsize; ++ n = 0; ++ while (count[n] == extent[n]) + { +- data = NULL; +- break; ++ count[n] = 0; ++ data -= stride[n] * extent[n]; ++ n++; ++ if (n == rank) ++ { ++ data = NULL; ++ break; ++ } ++ else ++ { ++ count[n]++; ++ data += stride[n]; ++ } + } +- else ++ } ++ } ++ else ++ { ++ while (data) ++ { ++ dtp->u.p.transfer (dtp, iotype, data, kind, size, tsize); ++ data += stride0 * tsize; ++ count[0] += tsize; ++ n = 0; ++ while (count[n] == extent[n]) + { +- count[n]++; +- data += stride[n]; ++ count[n] = 0; ++ data -= stride[n] * extent[n]; ++ n++; ++ if (n == rank) ++ { ++ data = NULL; ++ break; ++ } ++ else ++ { ++ count[n]++; ++ data += stride[n]; ++ } + } + } + } +@@ -3102,8 +3138,9 @@ + + if (dtp->pos != dtp->u.p.current_unit->strm_pos) + { +- fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode); +- if (sseek (dtp->u.p.current_unit->s, dtp->pos - 1, SEEK_SET) < 0) ++ fbuf_reset (dtp->u.p.current_unit); ++ if (sseek (dtp->u.p.current_unit->s, ++ dtp->pos - 1, SEEK_SET) < 0) + { + generate_error (&dtp->common, LIBERROR_OS, NULL); + return; Index: libgfortran/io/write_float.def =================================================================== --- a/src/libgfortran/io/write_float.def (.../tags/gcc_8_3_0_release) @@ -53871,6 +62931,31 @@ while (i < nafter) put[i++] = '0'; +Index: libcpp/directives.c +=================================================================== +--- a/src/libcpp/directives.c (.../tags/gcc_8_3_0_release) ++++ b/src/libcpp/directives.c (.../branches/gcc-8-branch) +@@ -1574,6 +1574,8 @@ + node = _cpp_lex_identifier (pfile, c->name); + if (node->type == NT_VOID) + c->is_undef = 1; ++ else if (node->type == NT_MACRO && (node->flags & NODE_BUILTIN)) ++ c->is_builtin = 1; + else + { + defn = cpp_macro_definition (pfile, node); +@@ -2504,6 +2506,11 @@ + cpp_hashnode *node = _cpp_lex_identifier (pfile, c->name); + if (node == NULL) + return; ++ if (c->is_builtin) ++ { ++ _cpp_restore_special_builtin (pfile, c); ++ return; ++ } + + if (pfile->cb.before_define) + pfile->cb.before_define (pfile); Index: libcpp/line-map.c =================================================================== --- a/src/libcpp/line-map.c (.../tags/gcc_8_3_0_release) @@ -53887,11 +62972,56 @@ || range_bits < map->m_range_bits) map = linemap_check_ordinary (const_cast +Index: libcpp/init.c +=================================================================== +--- a/src/libcpp/init.c (.../tags/gcc_8_3_0_release) ++++ b/src/libcpp/init.c (.../branches/gcc-8-branch) +@@ -488,6 +488,26 @@ + } + } + ++/* Restore macro C to builtin macro definition. */ ++ ++void ++_cpp_restore_special_builtin (cpp_reader *pfile, struct def_pragma_macro *c) ++{ ++ size_t len = strlen (c->name); ++ ++ for (const struct builtin_macro *b = builtin_array; ++ b < builtin_array + ARRAY_SIZE (builtin_array); b++) ++ if (b->len == len && memcmp (c->name, b->name, len + 1) == 0) ++ { ++ cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len); ++ hp->type = NT_MACRO; ++ hp->flags |= NODE_BUILTIN; ++ if (b->always_warn_if_redefined) ++ hp->flags |= NODE_WARN; ++ hp->value.builtin = (enum cpp_builtin_type) b->value; ++ } ++} ++ + /* Read the builtins table above and enter them, and language-specific + macros, into the hash table. HOSTED is true if this is a hosted + environment. */ Index: libcpp/ChangeLog =================================================================== --- a/src/libcpp/ChangeLog (.../tags/gcc_8_3_0_release) +++ b/src/libcpp/ChangeLog (.../branches/gcc-8-branch) -@@ -1,3 +1,22 @@ +@@ -1,3 +1,36 @@ ++2019-11-21 Jakub Jelinek ++ ++ Backported from mainline ++ 2019-10-31 Jakub Jelinek ++ ++ PR preprocessor/92296 ++ * internal.h (struct def_pragma_macro): Add is_builtin bitfield. ++ (_cpp_restore_special_builtin): Declare. ++ * init.c (_cpp_restore_special_builtin): New function. ++ * directives.c (do_pragma_push_macro): For NT_MACRO with NODE_BUILTIN ++ set is_builtin and don't try to grab definition. ++ (cpp_pop_definition): Use _cpp_restore_special_builtin to restore ++ builtin macros. ++ +2019-03-11 Martin Liska + + Backport from mainline @@ -53914,6 +63044,28 @@ 2019-02-22 Release Manager * GCC 8.3.0 released. +Index: libcpp/internal.h +=================================================================== +--- a/src/libcpp/internal.h (.../tags/gcc_8_3_0_release) ++++ b/src/libcpp/internal.h (.../branches/gcc-8-branch) +@@ -381,6 +381,8 @@ + + /* Mark if we save an undefined macro. */ + unsigned int is_undef : 1; ++ /* Nonzero if it was a builtin macro. */ ++ unsigned int is_builtin : 1; + }; + + /* A cpp_reader encapsulates the "state" of a pre-processor run. +@@ -689,6 +691,8 @@ + /* In init.c. */ + extern void _cpp_maybe_push_include_file (cpp_reader *); + extern const char *cpp_named_operator2name (enum cpp_ttype type); ++extern void _cpp_restore_special_builtin (cpp_reader *pfile, ++ struct def_pragma_macro *); + + /* In directives.c */ + extern int _cpp_test_assertion (cpp_reader *, unsigned int *); Index: fixincludes/ChangeLog =================================================================== --- a/src/fixincludes/ChangeLog (.../tags/gcc_8_3_0_release) diff -u gcc-8-8.3.0/debian/rules.conf gcc-8-8.3.0/debian/rules.conf --- gcc-8-8.3.0/debian/rules.conf +++ gcc-8-8.3.0/debian/rules.conf @@ -732,6 +732,9 @@ languages := $(filter-out objc objpp, $(languages)) endif endif +ifeq ($(with_dbg),yes) + addons += libdbg +endif ifeq ($(with_gccbase),yes) addons += gccbase endif @@ -1008,7 +1011,7 @@ -DGCC_PORTS_BUILD=$(GCC_PORTS_BUILD) \ -DPR66145BREAKS="$(if $(filter $(distrelease),sid buster stretch jessie wheezy squeeze precise trusty xenial bionic cosmic),$(if $(findstring build-native,$(build_type)),$(if $(filter new,$(libstdcxx_abi)),$$(tr '\n' ' ' < debian/libstdc++-breaks.$(derivative)))))" \ debian/control.m4 > debian/control.tmp2 - uniq debian/control.tmp2 | sed '/^Build/s/ *, */, /g;/^ /s/ *, */, /g' \ + uniq debian/control.tmp2 | grep -v '^ *, *$$' | sed '/^Build/s/ *, */, /g;/^ /s/ *, */, /g' \ $(if $(filter yes, $(with_base_only)), | awk '/^$$/ {if (p) exit; else p=1; } {print}') \ > debian/control.tmp rm -f debian/control.tmp2 diff -u gcc-8-8.3.0/debian/rules.d/binary-ada.mk gcc-8-8.3.0/debian/rules.d/binary-ada.mk --- gcc-8-8.3.0/debian/rules.d/binary-ada.mk +++ gcc-8-8.3.0/debian/rules.d/binary-ada.mk @@ -129,7 +129,7 @@ $(d_lgnat)/usr/share/lintian/overrides/$(p_lgnat) endif - dh_strip -p$(p_lgnat) --dbg-package=$(p_lgnat_dbg) + $(call do_strip_lib_dbg, $(p_lgnat), $(p_lgnat_dbg), $(v_dbg),,) $(cross_shlibdeps) dh_shlibdeps -p$(p_lgnat) \ $(call shlibdirs_to_search, \ $(subst gnat-$(GNAT_SONAME),gcc$(GCC_SONAME),$(p_lgnat)) \ @@ -138,10 +138,11 @@ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common) $(call cross_mangle_substvars,$(p_lgnat)) +ifeq ($(with_dbg),yes) : # $(p_lgnat_dbg) debian/dh_doclink -p$(p_lgnat_dbg) $(p_glbase) - - echo $(p_lgnat) $(p_lgnat_dbg) >> debian/$(lib_binaries) +endif + echo $(p_lgnat) $(if $(with_dbg), $(p_lgnat_dbg)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) @@ -163,7 +164,7 @@ > $(d_lgnatvsn)/usr/share/lintian/overrides/$(p_lgnatvsn) $(dh_compat2) dh_movefiles -p$(p_lgnatvsn) $(usr_lib)/libgnatvsn.so.$(GNAT_VERSION) debian/dh_doclink -p$(p_lgnatvsn) $(p_glbase) - dh_strip -p$(p_lgnatvsn) --dbg-package=$(p_lgnatvsn_dbg) + $(call do_strip_lib_dbg, $(p_lgnatvsn), $(p_lgnatvsn_dbg), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_lgnatvsn) \ -V '$(p_lgnatvsn) (>= $(DEB_VERSION))' $(call cross_mangle_shlibs,$(p_lgnatvsn)) @@ -177,10 +178,11 @@ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common) $(call cross_mangle_substvars,$(p_lgnatvsn)) +ifeq ($(with_dbg),yes) : # $(p_lgnatvsn_dbg) debian/dh_doclink -p$(p_lgnatvsn_dbg) $(p_glbase) - - echo $(p_lgnatvsn) $(p_lgnatvsn_dev) $(p_lgnatvsn_dbg) >> debian/$(lib_binaries) +endif + echo $(p_lgnatvsn) $(p_lgnatvsn_dev) $(if $(with_dbg), $(p_lgnatvsn_dbg)) >> debian/$(lib_binaries) touch $@ diff -u gcc-8-8.3.0/debian/rules.d/binary-d.mk gcc-8-8.3.0/debian/rules.d/binary-d.mk --- gcc-8-8.3.0/debian/rules.d/binary-d.mk +++ gcc-8-8.3.0/debian/rules.d/binary-d.mk @@ -180,7 +180,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libgphobos.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) \ -- -a$(call mlib_to_arch,$(2)) || echo XXXXXXXXXXX ERROR $(p_l) @@ -193,7 +193,7 @@ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) dh_lintian -p$(p_l) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-fortran.mk gcc-8-8.3.0/debian/rules.d/binary-fortran.mk --- gcc-8-8.3.0/debian/rules.d/binary-fortran.mk +++ gcc-8-8.3.0/debian/rules.d/binary-fortran.mk @@ -97,7 +97,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libgfortran.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -108,7 +108,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-go.mk gcc-8-8.3.0/debian/rules.d/binary-go.mk --- gcc-8-8.3.0/debian/rules.d/binary-go.mk +++ gcc-8-8.3.0/debian/rules.d/binary-go.mk @@ -122,6 +122,7 @@ : # don't strip: https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01722.html : # dh_strip -p$(p_l) --dbg-package=$(p_d) + : # $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -131,7 +132,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libasan.mk gcc-8-8.3.0/debian/rules.d/binary-libasan.mk --- gcc-8-8.3.0/debian/rules.d/binary-libasan.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libasan.mk @@ -35,7 +35,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(if $(ignshld),$(ignshld),-)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -45,7 +45,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libatomic.mk gcc-8-8.3.0/debian/rules.d/binary-libatomic.mk --- gcc-8-8.3.0/debian/rules.d/binary-libatomic.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libatomic.mk @@ -30,14 +30,14 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libatomic.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ $(call shlibdirs_to_search,,$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libgcc.mk gcc-8-8.3.0/debian/rules.d/binary-libgcc.mk --- gcc-8-8.3.0/debian/rules.d/binary-libgcc.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libgcc.mk @@ -307,7 +307,7 @@ debian/dh_doclink -p$(p_d) $(if $(3),$(3),$(p_lbase)) debian/dh_rmemptydirs -p$(p_l) debian/dh_rmemptydirs -p$(p_d) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(EPOCH):$(v_dbg),,) # see Debian #533843 for the __aeabi symbol handling; this construct is # just to include the symbols for dpkg versions older than 1.15.3 which @@ -316,7 +316,7 @@ $(if $(findstring gcc1,$(p_l)), \ ln -sf libgcc.symbols debian/$(p_l).symbols \ ) - $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) -p$(p_d) \ + $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) \ -- -v$(DEB_LIBGCC_VERSION) -a$(call mlib_to_arch,$(2)) || echo XXXXXXXXXXXXXX ERROR $(p_l) $(call cross_mangle_shlibs,$(p_l)) $(if $(filter arm-linux-gnueabi%,$(DEB_TARGET_GNU_TYPE)), @@ -340,7 +340,7 @@ > $(d_l)/usr/share/lintian/overrides/$(p_l) ) - echo $(p_l) $(p_d) >> debian/$(lib_binaries).epoch + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries).epoch trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libgccjit.mk gcc-8-8.3.0/debian/rules.d/binary-libgccjit.mk --- gcc-8-8.3.0/debian/rules.d/binary-libgccjit.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libgccjit.mk @@ -26,22 +26,26 @@ rm -rf $(d_jitlib) $(d_jitdbg) dh_installdirs -p$(p_jitlib) \ $(usr_lib) +ifeq ($(with_dbg),yes) dh_installdirs -p$(p_jitdbg) +endif $(dh_compat2) dh_movefiles -p$(p_jitlib) \ $(usr_lib)/libgccjit.so.* rm -f $(d)/$(usr_lib)/libgccjit.so debian/dh_doclink -p$(p_jitlib) $(p_base) +ifeq ($(with_dbg),yes) debian/dh_doclink -p$(p_jitdbg) $(p_base) +endif - dh_strip -p$(p_jitlib) --dbg-package=$(p_jitdbg) + $(call do_strip_lib_dbg, $(p_jitlib), $(p_jitdbg), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs -p$(p_jitlib) $(call cross_mangle_shlibs,$(p_jitlib)) $(ignshld)$(cross_shlibdeps) dh_shlibdeps -p$(p_jitlib) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_jitlib)) - echo $(p_jitlib) $(p_jitdbg) >> debian/arch_binaries + echo $(p_jitlib) $(if $(with_dbg), $(p_jitdbg)) >> debian/arch_binaries trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) touch $@ diff -u gcc-8-8.3.0/debian/rules.d/binary-libgomp.mk gcc-8-8.3.0/debian/rules.d/binary-libgomp.mk --- gcc-8-8.3.0/debian/rules.d/binary-libgomp.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libgomp.mk @@ -30,7 +30,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libgomp.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -38,7 +38,7 @@ $(call shlibdirs_to_search,$(subst gomp$(GOMP_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libhsail.mk gcc-8-8.3.0/debian/rules.d/binary-libhsail.mk --- gcc-8-8.3.0/debian/rules.d/binary-libhsail.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libhsail.mk @@ -53,7 +53,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libhsail-rt.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -61,7 +61,7 @@ $(call shlibdirs_to_search,$(subst hsail-rt$(HSAIL_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libitm.mk gcc-8-8.3.0/debian/rules.d/binary-libitm.mk --- gcc-8-8.3.0/debian/rules.d/binary-libitm.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libitm.mk @@ -30,7 +30,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libitm.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -38,7 +38,7 @@ $(call shlibdirs_to_search,,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-liblsan.mk gcc-8-8.3.0/debian/rules.d/binary-liblsan.mk --- gcc-8-8.3.0/debian/rules.d/binary-liblsan.mk +++ gcc-8-8.3.0/debian/rules.d/binary-liblsan.mk @@ -35,7 +35,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -45,7 +45,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libmpx.mk gcc-8-8.3.0/debian/rules.d/binary-libmpx.mk --- gcc-8-8.3.0/debian/rules.d/binary-libmpx.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libmpx.mk @@ -30,14 +30,16 @@ $(usr_lib$(2))/libmpxwrappers.so.* debian/dh_doclink -p$(p_l) $(p_lbase) - debian/dh_doclink -p$(p_d) $(p_lbase) + $(if $(with_dbg), + debian/dh_doclink -p$(p_d) $(p_lbase) + ) if [ -f debian/$(p_l).overrides ]; then \ mkdir -p debian/$(p_l)/usr/share/lintian/overrides; \ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libmpx.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -47,7 +49,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libobjc.mk gcc-8-8.3.0/debian/rules.d/binary-libobjc.mk --- gcc-8-8.3.0/debian/rules.d/binary-libobjc.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libobjc.mk @@ -65,7 +65,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) rm -f debian/$(p_l).symbols $(if $(2), ln -sf libobjc.symbols debian/$(p_l).symbols , @@ -79,7 +79,7 @@ $(call shlibdirs_to_search,$(subst objc$(OBJC_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libquadmath.mk gcc-8-8.3.0/debian/rules.d/binary-libquadmath.mk --- gcc-8-8.3.0/debian/rules.d/binary-libquadmath.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libquadmath.mk @@ -30,7 +30,7 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_doclink -p$(p_d) $(p_lbase) - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) ln -sf libquadmath.symbols debian/$(p_l).symbols $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) @@ -38,7 +38,7 @@ $(call shlibdirs_to_search,,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libstdcxx.mk gcc-8-8.3.0/debian/rules.d/binary-libstdcxx.mk --- gcc-8-8.3.0/debian/rules.d/binary-libstdcxx.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libstdcxx.mk @@ -207,8 +207,10 @@ debian/dh_doclink -p$(p_l) $(p_lbase) debian/dh_rmemptydirs -p$(p_l) - dh_strip -p$(p_l) $(if $(filter rtlibs,$(DEB_STAGE)),,--dbg-package=$(1)-$(BASE_VERSION)-dbg$(cross_lib_arch)) - + $(if $(with_dbg), + dh_strip -p$(p_l) $(if $(filter rtlibs,$(DEB_STAGE)),,--dbg-package=$(1)-$(BASE_VERSION)-dbg$(cross_lib_arch)), + dh_strip -p$(p_l) $(if $(filter rtlibs,$(DEB_STAGE)),,--dbgsym-migration='$(1)-$(BASE_VERSION)-dbg$(cross_lib_arch) (<< $(v_dbg))') + ) $(if $(filter $(DEB_TARGET_ARCH), armel hppa sparc64), \ -$(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) \ @echo "FIXME: libstdc++ not feature complete (https://gcc.gnu.org/ml/gcc/2014-07/msg00000.html)", \ @@ -235,7 +237,8 @@ $(PF)/lib/debug/$(usr_lib$(2)) \ $(usr_lib$(2)) - $(if $(filter yes,$(with_lib$(2)cxx)), + $(if $(with_dbg), + $(if $(filter yes,$(with_lib$(2)cxx)), cp -a $(d)/$(usr_lib$(2))/libstdc++.so.*[0-9] \ $(d_d)/$(usr_lib$(2))/.; dh_strip -p$(p_d) --keep-debug; @@ -245,6 +248,7 @@ rm -rf $(d_d)/usr/lib/debug/$(PF); ) rm -f $(d_d)/$(usr_lib$(2))/libstdc++.so.*[0-9] + ) ) $(if $(filter yes,$(with_cxx_debug)), @@ -363,6 +367,7 @@ ifeq ($(with_check),yes) libcxxdev_deps += debian/README.libstdc++-baseline endif +# FIXME: the -dev and -dbg packages are built twice ... $(binary_stamp)-libstdcxx-dev: $(libcxxdev_deps) dh_testdir dh_testroot @@ -424,13 +429,14 @@ $(d_dbg)/$(PF)/share/gdb/auto-load/$(usr_lib)/debug/libstdc++.so.*.py ifeq ($(with_libcxx),yes) + ifeq ($(with_dbg),yes) cp -a $(d)/$(usr_lib)/libstdc++.so.*[0-9] \ $(d_dbg)/$(usr_lib)/ dh_strip -p$(p_dbg) --keep-debug rm -f $(d_dbg)/$(usr_lib)/libstdc++.so.*[0-9] + endif endif - - dh_strip -p$(p_dev) --dbg-package=$(p_dbg) + $(call do_strip_lib_dbg, $(p_dev), $(p_dbg), $(v_dbg),,) ifneq ($(with_common_libs),yes) : # remove the debug symbols for libstdc++ built by a newer version of GCC rm -rf $(d_dbg)/usr/lib/debug/$(PF) diff -u gcc-8-8.3.0/debian/rules.d/binary-libtsan.mk gcc-8-8.3.0/debian/rules.d/binary-libtsan.mk --- gcc-8-8.3.0/debian/rules.d/binary-libtsan.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libtsan.mk @@ -39,7 +39,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -49,7 +49,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libubsan.mk gcc-8-8.3.0/debian/rules.d/binary-libubsan.mk --- gcc-8-8.3.0/debian/rules.d/binary-libubsan.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libubsan.mk @@ -35,7 +35,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -45,7 +45,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.d/binary-libvtv.mk gcc-8-8.3.0/debian/rules.d/binary-libvtv.mk --- gcc-8-8.3.0/debian/rules.d/binary-libvtv.mk +++ gcc-8-8.3.0/debian/rules.d/binary-libvtv.mk @@ -35,7 +35,7 @@ cp debian/$(p_l).overrides debian/$(p_l)/usr/share/lintian/overrides/$(p_l); \ fi - dh_strip -p$(p_l) --dbg-package=$(p_d) + $(call do_strip_lib_dbg, $(p_l), $(p_d), $(v_dbg),,) $(cross_makeshlibs) dh_makeshlibs $(ldconfig_arg) -p$(p_l) $(call cross_mangle_shlibs,$(p_l)) $(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \ @@ -45,7 +45,7 @@ ,$(2)) \ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2)) $(call cross_mangle_substvars,$(p_l)) - echo $(p_l) $(p_d) >> debian/$(lib_binaries) + echo $(p_l) $(if $(with_dbg), $(p_d)) >> debian/$(lib_binaries) trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) endef diff -u gcc-8-8.3.0/debian/rules.defs gcc-8-8.3.0/debian/rules.defs --- gcc-8-8.3.0/debian/rules.defs +++ gcc-8-8.3.0/debian/rules.defs @@ -357,7 +357,7 @@ endif # FIXME: newer binutils needed? - ifneq (,$(filter $(distrelease),precise trusty xenial)) + ifneq (,$(filter $(distrelease),precise trusty xenial bionic)) with_bootstrap := with_lto_build := endif @@ -378,7 +378,7 @@ ifeq (,$(filter $(distrelease),jessie stretch precise trusty xenial bionic cosmic disco)) with_dwz := yes endif -else ifneq (,$(filter $(distrelease),jessie stretch precise trusty xenial)) +else ifneq (,$(filter $(distrelease),jessie stretch precise trusty xenial bionic)) with_dwz := else with_dwz := yes @@ -529,6 +529,19 @@ # XXX: should with_common_libs be "yes" only if this is the default compiler # version on the targeted arch? +# build -dbg packages (with_dbg is empty when -dbg package are not built) +ifneq (,$(filter $(distrelease),wheezy jessie stretch buster precise xenial bionic cosmic disco eoan)) + with_dbg = yes +else + ifeq ($(derivative),Ubuntu) + v_dbg = 8.3.0-26ubuntu1 + else ifeq ($(derivative),Debian) + v_dbg = 8.3.0-26 + else + $(error unknown version for -dbgsym package migration) + endif +endif + # is this a multiarch-enabled build? ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick)) with_multiarch_lib := yes diff -u gcc-8-8.3.0/debian/rules.parameters gcc-8-8.3.0/debian/rules.parameters --- gcc-8-8.3.0/debian/rules.parameters +++ gcc-8-8.3.0/debian/rules.parameters @@ -2,14 +2,14 @@ GCC_VERSION := 8.3.0 NEXT_GCC_VERSION := 8.3.1 BASE_VERSION := 8 -SOURCE_VERSION := 8.3.0-23ubuntu2 -DEB_VERSION := 8.3.0-23ubuntu2 -DEB_EVERSION := 1:8.3.0-23ubuntu2 -DEB_GDC_VERSION := 8.3.0-23ubuntu2 +SOURCE_VERSION := 8.3.0-26ubuntu1~19.10 +DEB_VERSION := 8.3.0-26ubuntu1~19.10 +DEB_EVERSION := 1:8.3.0-26ubuntu1~19.10 +DEB_GDC_VERSION := 8.3.0-26ubuntu1~19.10 DEB_SOVERSION := 5 DEB_SOEVERSION := 1:5 DEB_LIBGCC_SOVERSION := -DEB_LIBGCC_VERSION := 1:8.3.0-23ubuntu2 +DEB_LIBGCC_VERSION := 1:8.3.0-26ubuntu1~19.10 DEB_STDCXX_SOVERSION := 5 DEB_GOMP_SOVERSION := 5 GCC_SONAME := 1 diff -u gcc-8-8.3.0/debian/rules2 gcc-8-8.3.0/debian/rules2 --- gcc-8-8.3.0/debian/rules2 +++ gcc-8-8.3.0/debian/rules2 @@ -1027,7 +1027,12 @@ rm -f $(d)/$(usr_lib$(3))/$(1)*.{la,so} dh_link -p$(4) \ /$(usr_lib$(3))/$(1).so.$(2) /$(gcc_lib_dir$(3))/$(1).so +endef +# do_strip_lib_dbg(pkg,pkg_dbg,version,excludes) +define do_strip_lib_dbg + dh_strip -p$(strip $(1)) $(4) \ + $(if $(with_dbg),--dbg-package=$(strip $(2)),--dbgsym-migration='$(strip $(2)) (<< $(strip $(3)))') endef checkdirs = $(builddir)