From e0c920a4063918ac8b6a8f97fe9ecdc8fb28e6d6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 21 Feb 2019 22:28:06 +0100 Subject: [PATCH 01/10] 9.0.1-0.6 --- .gitignore | 1 + gcc.spec | 21 ++++++++++-------- gcc9-pr88714.patch | 39 ---------------------------------- gcc9-pr89402.patch | 16 -------------- gcc9-s390x-bootstrap-fix.patch | 17 --------------- sources | 2 +- 6 files changed, 14 insertions(+), 82 deletions(-) delete mode 100644 gcc9-pr88714.patch delete mode 100644 gcc9-pr89402.patch delete mode 100644 gcc9-s390x-bootstrap-fix.patch diff --git a/.gitignore b/.gitignore index 8d92f45..a7a7491 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ /gcc-9.0.1-20190209.tar.xz /gcc-9.0.1-20190215.tar.xz /gcc-9.0.1-20190219.tar.xz +/gcc-9.0.1-20190221.tar.xz diff --git a/gcc.spec b/gcc.spec index 7c18f7c..04cb4da 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20190219 -%global SVNREV 269023 +%global DATE 20190221 +%global SVNREV 269078 %global gcc_version 9.0.1 %global gcc_major 9 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.6 +%global gcc_release 0.7 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -256,9 +256,6 @@ Patch10: gcc9-rh1574936.patch Patch11: gcc9-d-shared-libphobos.patch Patch12: gcc9-pr89014.patch Patch13: gcc9-pr89093.patch -Patch14: gcc9-s390x-bootstrap-fix.patch -Patch15: gcc9-pr88714.patch -Patch16: gcc9-pr89402.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -771,9 +768,6 @@ to NVidia PTX capable devices if available. %patch11 -p0 -b .d-shared-libphobos~ %patch12 -p0 -b .pr89014~ %patch13 -p0 -b .pr89093~ -%patch14 -p0 -b .s390x-bootstrap~ -%patch15 -p0 -b .pr88714~ -%patch16 -p0 -b .pr89402~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -2962,6 +2956,15 @@ end %endif %changelog +* Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.6 +- update from trunk + - PRs c++/84536, c++/87513, c++/87921, c++/88368, c++/88380, c++/88572, + c++/88690, c++/89403, c++/89405, c/89410, fortran/86119, + fortran/89384, hsa/89302, libstdc++/89402, libstdc++/89416, + middle-end/89091, middle-end/89392, middle-end/89412, + middle-end/89415, sanitizer/89409, target/86487, target/87412, + target/88100 + * Tue Feb 19 2019 Jakub Jelinek 9.0.1-0.6 - update from trunk - PRs c++/88680, c++/89217, c++/89315, c++/89336, c++/89356, c++/89383, diff --git a/gcc9-pr88714.patch b/gcc9-pr88714.patch deleted file mode 100644 index fddbf38..0000000 --- a/gcc9-pr88714.patch +++ /dev/null @@ -1,39 +0,0 @@ -2019-02-18 Jakub Jelinek - - PR bootstrap/88714 - * constraints.md (q): Remove. - * config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use rk constraint - instead of q. - ---- gcc/config/arm/constraints.md.jj 2019-01-01 12:37:27.032812929 +0100 -+++ gcc/config/arm/constraints.md 2019-02-18 20:18:51.816941795 +0100 -@@ -90,9 +90,6 @@ (define_constraint "PJ" - (define_register_constraint "k" "STACK_REG" - "@internal The stack register.") - --(define_register_constraint "q" "(TARGET_ARM && TARGET_LDRD) ? CORE_REGS : GENERAL_REGS" -- "@internal In ARM state with LDRD support, core registers, otherwise general registers.") -- - (define_register_constraint "b" "TARGET_THUMB ? BASE_REGS : NO_REGS" - "@internal - Thumb only. The union of the low registers and the stack register.") ---- gcc/config/arm/ldrdstrd.md.jj 2019-02-18 20:19:34.976233961 +0100 -+++ gcc/config/arm/ldrdstrd.md 2019-02-18 20:19:54.555912842 +0100 -@@ -159,7 +159,7 @@ (define_peephole2 ; swap the destination - (define_insn "*arm_ldrd" - [(parallel [(set (match_operand:SI 0 "s_register_operand" "=r") - (match_operand:SI 2 "memory_operand" "m")) -- (set (match_operand:SI 1 "s_register_operand" "=q") -+ (set (match_operand:SI 1 "s_register_operand" "=rk") - (match_operand:SI 3 "memory_operand" "m"))])] - "TARGET_LDRD && TARGET_ARM && reload_completed - && valid_operands_ldrd_strd (operands, true)" -@@ -180,7 +180,7 @@ (define_insn "*arm_strd" - [(parallel [(set (match_operand:SI 2 "memory_operand" "=m") - (match_operand:SI 0 "s_register_operand" "r")) - (set (match_operand:SI 3 "memory_operand" "=m") -- (match_operand:SI 1 "s_register_operand" "q"))])] -+ (match_operand:SI 1 "s_register_operand" "rk"))])] - "TARGET_LDRD && TARGET_ARM && reload_completed - && valid_operands_ldrd_strd (operands, false)" - { diff --git a/gcc9-pr89402.patch b/gcc9-pr89402.patch deleted file mode 100644 index a8fc080..0000000 --- a/gcc9-pr89402.patch +++ /dev/null @@ -1,16 +0,0 @@ -2019-02-19 Jakub Jelinek - - PR libstdc++/89402 - * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add - _GLIBCXX_PURE to the alias declaration. - ---- libstdc++-v3/src/c++98/compatibility-ldbl.cc.jj 2019-01-01 12:39:41.530606161 +0100 -+++ libstdc++-v3/src/c++98/compatibility-ldbl.cc 2019-02-19 16:12:52.402123217 +0100 -@@ -75,6 +75,6 @@ namespace std _GLIBCXX_VISIBILITY(defaul - // and std::hash::operator() - // are the same, no need to duplicate them. - extern "C" void _ZNKSt4hashIeEclEe (void) -- __attribute__((alias ("_ZNKSt3tr14hashIeEclEe"))); -+ _GLIBCXX_PURE __attribute__((alias ("_ZNKSt3tr14hashIeEclEe"))); - - #endif diff --git a/gcc9-s390x-bootstrap-fix.patch b/gcc9-s390x-bootstrap-fix.patch deleted file mode 100644 index f010d99..0000000 --- a/gcc9-s390x-bootstrap-fix.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- libgo/go/internal/cpu/cpu_gccgo.c.jj 2019-02-16 07:57:27.882179972 +0100 -+++ libgo/go/internal/cpu/cpu_gccgo.c 2019-02-16 08:36:37.241900882 +0100 -@@ -71,7 +71,7 @@ struct xgetbv_ret xgetbv(void) { - - #endif /* defined(__i386__) || defined(__x86_64__) */ - --#ifdef __s390__ -+#ifdef __s390x__ - - struct facilityList { - uint64_t bits[4]; -@@ -184,4 +184,4 @@ struct queryResult klmdQuery() { - return ret; - } - --#endif /* defined(__s390__) */ -+#endif /* defined(__s390x__) */ diff --git a/sources b/sources index c51b1c7..dc0ac02 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-9.0.1-20190219.tar.xz) = 5c4b8f38bc87c19337cb4b7fdbc4910eefabc43f06f4224087f7b4879750722a0b508cd214f0ac880c23ed8f8deb803442cbbe1e7ea6f8f24c6a6365e8d0a1a7 +SHA512 (gcc-9.0.1-20190221.tar.xz) = 2a83371869c2b5cc52b789236db2a55cf59294e0a8e7ae1e44d4dac873bbecd7daa33bcd15c0a7bce2941f8c68329de1f88d6ac09effb3c9e04f76902227a3b9 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1 From d1c6bd89f34e38cc2eb937cf92a87cbb9be0514a Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 25 Feb 2019 09:45:10 +0100 Subject: [PATCH 02/10] fix up revision in %changelog --- gcc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc.spec b/gcc.spec index 04cb4da..d829928 100644 --- a/gcc.spec +++ b/gcc.spec @@ -2956,7 +2956,7 @@ end %endif %changelog -* Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.6 +* Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.7 - update from trunk - PRs c++/84536, c++/87513, c++/87921, c++/88368, c++/88380, c++/88572, c++/88690, c++/89403, c++/89405, c/89410, fortran/86119, From 8ccdd26200ffb1f036f25bb78db65fd23ae3f417 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 27 Feb 2019 15:29:11 +0100 Subject: [PATCH 03/10] 9.0.1-0.8 --- .gitignore | 1 + gcc.spec | 37 ++++++++- gcc9-pr70341.patch | 187 +++++++++++++++++++++++++++++++++++++++++++++ gcc9-pr89490.patch | 60 +++++++++++++++ gcc9-pr89506.patch | 71 +++++++++++++++++ sources | 2 +- 6 files changed, 354 insertions(+), 4 deletions(-) create mode 100644 gcc9-pr70341.patch create mode 100644 gcc9-pr89490.patch create mode 100644 gcc9-pr89506.patch diff --git a/.gitignore b/.gitignore index a7a7491..d930a11 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ /gcc-9.0.1-20190215.tar.xz /gcc-9.0.1-20190219.tar.xz /gcc-9.0.1-20190221.tar.xz +/gcc-9.0.1-20190227.tar.xz diff --git a/gcc.spec b/gcc.spec index d829928..ec5b94e 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20190221 -%global SVNREV 269078 +%global DATE 20190227 +%global SVNREV 269254 %global gcc_version 9.0.1 %global gcc_major 9 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.7 +%global gcc_release 0.8 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -256,6 +256,9 @@ Patch10: gcc9-rh1574936.patch Patch11: gcc9-d-shared-libphobos.patch Patch12: gcc9-pr89014.patch Patch13: gcc9-pr89093.patch +Patch14: gcc9-pr70341.patch +Patch15: gcc9-pr89490.patch +Patch16: gcc9-pr89506.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -768,6 +771,9 @@ to NVidia PTX capable devices if available. %patch11 -p0 -b .d-shared-libphobos~ %patch12 -p0 -b .pr89014~ %patch13 -p0 -b .pr89093~ +%patch14 -p0 -b .pr70341~ +%patch15 -p0 -b .pr89490~ +%patch16 -p0 -b .pr89506~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -2956,6 +2962,31 @@ end %endif %changelog +* Wed Feb 27 2019 Jakub Jelinek 9.0.1-0.8 +- update from trunk + - PRs c++/84585, c++/84676, c++/87685, c++/88294, c++/88394, c++/88419, + c++/88869, c++/88987, c++/89285, c++/89419, c++/89420, c++/89422, + c++/89481, c++/89488, c++/89507, c/77754, c/80409, c/89425, c/89495, + debug/88878, debug/89514, driver/69471, fortran/43210, fortran/72741, + fortran/78027, fortran/83057, fortran/84387, fortran/88117, + fortran/88326, fortran/89174, fortran/89266, fortran/89282, + fortran/89366, fortran/89385, fortran/89431, fortran/89492, + fortran/89496, go/89170, libfortran/89274, libstdc++/89446, + libstdc++/89466, libstdc++/89477, middle-end/85598, middle-end/87609, + rtl-optimization/86096, rtl-optimization/87761, + rtl-optimization/89445, target/87007, target/88530, target/89324, + target/89338, target/89339, target/89434, target/89438, target/89444, + target/89474, testsuite/89476, tree-optimization/87609, + tree-optimization/88853, tree-optimization/88993, + tree-optimization/89280, tree-optimization/89440, + tree-optimization/89489, tree-optimization/89500, + tree-optimization/89505 +- improve arm and aarch64 casesi (PR target/70341) +- don't use section anchors block infrastructure for mergeable section + data (PR rtl-optimization/89490) +- fix arm cmpsi2_addneg and subsi3_carryin_compare_const patterns + and corresponding splitters (PR target/89506) + * Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.7 - update from trunk - PRs c++/84536, c++/87513, c++/87921, c++/88368, c++/88380, c++/88572, diff --git a/gcc9-pr70341.patch b/gcc9-pr70341.patch new file mode 100644 index 0000000..2db1d9c --- /dev/null +++ b/gcc9-pr70341.patch @@ -0,0 +1,187 @@ +2019-02-23 Jakub Jelinek + + PR target/70341 + * config/arm/arm.md (arm_casesi_internal): New define_expand. Rename + old define_insn to ... + (*arm_casesi_internal): ... this. Add mode to LABEL_REFs. + * config/arm/thumb2.md (thumb2_casesi_internal): New define_expand. + Rename old define_insn to ... + (*thumb2_casesi_internal): ... this. Add mode to LABEL_REFs. + (thumb2_casesi_internal_pic): New define_expand. Rename old + define_insn to ... + (*thumb2_casesi_internal_pic): ... this. Add mode to LABEL_REFs. + * config/aarch64/aarch64.md (casesi): Create the casesi_dispatch + MEM manually here, set MEM_READONLY_P and MEM_NOTRAP_P on it. + +--- gcc/config/arm/arm.md.jj 2019-02-18 20:48:32.643732307 +0100 ++++ gcc/config/arm/arm.md 2019-02-21 14:40:50.603452028 +0100 +@@ -8914,16 +8914,35 @@ (define_expand "casesi" + + ;; The USE in this pattern is needed to tell flow analysis that this is + ;; a CASESI insn. It has no other purpose. +-(define_insn "arm_casesi_internal" ++(define_expand "arm_casesi_internal" ++ [(parallel [(set (pc) ++ (if_then_else ++ (leu (match_operand:SI 0 "s_register_operand") ++ (match_operand:SI 1 "arm_rhs_operand")) ++ (match_dup 4) ++ (label_ref:SI (match_operand 3 "")))) ++ (clobber (reg:CC CC_REGNUM)) ++ (use (label_ref:SI (match_operand 2 "")))])] ++ "TARGET_ARM" ++{ ++ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); ++ operands[4] = gen_rtx_PLUS (SImode, operands[4], ++ gen_rtx_LABEL_REF (SImode, operands[2])); ++ operands[4] = gen_rtx_MEM (SImode, operands[4]); ++ MEM_READONLY_P (operands[4]) = 1; ++ MEM_NOTRAP_P (operands[4]) = 1; ++}) ++ ++(define_insn "*arm_casesi_internal" + [(parallel [(set (pc) + (if_then_else + (leu (match_operand:SI 0 "s_register_operand" "r") + (match_operand:SI 1 "arm_rhs_operand" "rI")) + (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) +- (label_ref (match_operand 2 "" "")))) +- (label_ref (match_operand 3 "" "")))) ++ (label_ref:SI (match_operand 2 "" "")))) ++ (label_ref:SI (match_operand 3 "" "")))) + (clobber (reg:CC CC_REGNUM)) +- (use (label_ref (match_dup 2)))])] ++ (use (label_ref:SI (match_dup 2)))])] + "TARGET_ARM" + "* + if (flag_pic) +--- gcc/config/arm/thumb2.md.jj 2019-01-01 12:37:28.280792453 +0100 ++++ gcc/config/arm/thumb2.md 2019-02-21 15:00:26.811137210 +0100 +@@ -1079,17 +1079,37 @@ (define_insn "thumb2_zero_extendqisi2_v6 + (set_attr "neg_pool_range" "*,250")] + ) + +-(define_insn "thumb2_casesi_internal" ++(define_expand "thumb2_casesi_internal" ++ [(parallel [(set (pc) ++ (if_then_else ++ (leu (match_operand:SI 0 "s_register_operand") ++ (match_operand:SI 1 "arm_rhs_operand")) ++ (match_dup 4) ++ (label_ref:SI (match_operand 3 "")))) ++ (clobber (reg:CC CC_REGNUM)) ++ (clobber (match_scratch:SI 5)) ++ (use (label_ref:SI (match_operand 2 "")))])] ++ "TARGET_THUMB2 && !flag_pic" ++{ ++ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); ++ operands[4] = gen_rtx_PLUS (SImode, operands[4], ++ gen_rtx_LABEL_REF (SImode, operands[2])); ++ operands[4] = gen_rtx_MEM (SImode, operands[4]); ++ MEM_READONLY_P (operands[4]) = 1; ++ MEM_NOTRAP_P (operands[4]) = 1; ++}) ++ ++(define_insn "*thumb2_casesi_internal" + [(parallel [(set (pc) + (if_then_else + (leu (match_operand:SI 0 "s_register_operand" "r") + (match_operand:SI 1 "arm_rhs_operand" "rI")) + (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) +- (label_ref (match_operand 2 "" "")))) +- (label_ref (match_operand 3 "" "")))) ++ (label_ref:SI (match_operand 2 "" "")))) ++ (label_ref:SI (match_operand 3 "" "")))) + (clobber (reg:CC CC_REGNUM)) + (clobber (match_scratch:SI 4 "=&r")) +- (use (label_ref (match_dup 2)))])] ++ (use (label_ref:SI (match_dup 2)))])] + "TARGET_THUMB2 && !flag_pic" + "* return thumb2_output_casesi(operands);" + [(set_attr "conds" "clob") +@@ -1097,18 +1117,39 @@ (define_insn "thumb2_casesi_internal" + (set_attr "type" "multiple")] + ) + +-(define_insn "thumb2_casesi_internal_pic" ++(define_expand "thumb2_casesi_internal_pic" ++ [(parallel [(set (pc) ++ (if_then_else ++ (leu (match_operand:SI 0 "s_register_operand") ++ (match_operand:SI 1 "arm_rhs_operand")) ++ (match_dup 4) ++ (label_ref:SI (match_operand 3 "")))) ++ (clobber (reg:CC CC_REGNUM)) ++ (clobber (match_scratch:SI 5)) ++ (clobber (match_scratch:SI 6)) ++ (use (label_ref:SI (match_operand 2 "")))])] ++ "TARGET_THUMB2 && flag_pic" ++{ ++ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); ++ operands[4] = gen_rtx_PLUS (SImode, operands[4], ++ gen_rtx_LABEL_REF (SImode, operands[2])); ++ operands[4] = gen_rtx_MEM (SImode, operands[4]); ++ MEM_READONLY_P (operands[4]) = 1; ++ MEM_NOTRAP_P (operands[4]) = 1; ++}) ++ ++(define_insn "*thumb2_casesi_internal_pic" + [(parallel [(set (pc) + (if_then_else + (leu (match_operand:SI 0 "s_register_operand" "r") + (match_operand:SI 1 "arm_rhs_operand" "rI")) + (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) +- (label_ref (match_operand 2 "" "")))) +- (label_ref (match_operand 3 "" "")))) ++ (label_ref:SI (match_operand 2 "" "")))) ++ (label_ref:SI (match_operand 3 "" "")))) + (clobber (reg:CC CC_REGNUM)) + (clobber (match_scratch:SI 4 "=&r")) + (clobber (match_scratch:SI 5 "=r")) +- (use (label_ref (match_dup 2)))])] ++ (use (label_ref:SI (match_dup 2)))])] + "TARGET_THUMB2 && flag_pic" + "* return thumb2_output_casesi(operands);" + [(set_attr "conds" "clob") +--- gcc/config/aarch64/aarch64.md.jj 2019-01-19 09:39:18.847831222 +0100 ++++ gcc/config/aarch64/aarch64.md 2019-02-21 15:25:27.874532191 +0100 +@@ -622,13 +622,27 @@ (define_expand "casesi" + operands[0], operands[2], operands[4])); + + operands[2] = force_reg (DImode, gen_rtx_LABEL_REF (DImode, operands[3])); +- emit_jump_insn (gen_casesi_dispatch (operands[2], operands[0], +- operands[3])); ++ operands[2] ++ = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, operands[2], operands[0]), ++ UNSPEC_CASESI); ++ operands[2] = gen_rtx_MEM (DImode, operands[2]); ++ MEM_READONLY_P (operands[2]) = 1; ++ MEM_NOTRAP_P (operands[2]) = 1; ++ emit_jump_insn (gen_casesi_dispatch (operands[2], operands[3])); + DONE; + } + ) + +-(define_insn "casesi_dispatch" ++(define_expand "casesi_dispatch" ++ [(parallel ++ [(set (pc) (match_operand:DI 0 "")) ++ (clobber (reg:CC CC_REGNUM)) ++ (clobber (match_scratch:DI 2)) ++ (clobber (match_scratch:DI 3)) ++ (use (label_ref:DI (match_operand 1 "")))])] ++ "") ++ ++(define_insn "*casesi_dispatch" + [(parallel + [(set (pc) + (mem:DI (unspec [(match_operand:DI 0 "register_operand" "r") +@@ -637,7 +651,7 @@ (define_insn "casesi_dispatch" + (clobber (reg:CC CC_REGNUM)) + (clobber (match_scratch:DI 3 "=r")) + (clobber (match_scratch:DI 4 "=r")) +- (use (label_ref (match_operand 2 "" "")))])] ++ (use (label_ref:DI (match_operand 2 "" "")))])] + "" + "* + return aarch64_output_casesi (operands); diff --git a/gcc9-pr89490.patch b/gcc9-pr89490.patch new file mode 100644 index 0000000..38df53c --- /dev/null +++ b/gcc9-pr89490.patch @@ -0,0 +1,60 @@ +2019-02-27 Bernd Edlinger + + PR rtl-optimization/89490 + * varasm.c (get_block_for_section): Bail out for mergeable sections. + (default_use_anchors_for_symbol_p, output_object_block): Assert the + block section is not mergeable. + +--- gcc/varasm.c.orig 2019-02-21 23:50:24.000000000 +0100 ++++ gcc/varasm.c 2019-02-27 11:33:32.741967812 +0100 +@@ -363,7 +363,11 @@ use_object_blocks_p (void) + + /* Return the object_block structure for section SECT. Create a new + structure if we haven't created one already. Return null if SECT +- itself is null. */ ++ itself is null. Return also null for mergeable sections since ++ section anchors can't be used in mergeable sections anyway, ++ because the linker might move objects around, and using the ++ object blocks infrastructure in that case is both a waste and a ++ maintenance burden. */ + + static struct object_block * + get_block_for_section (section *sect) +@@ -373,6 +377,9 @@ get_block_for_section (section *sect) + if (sect == NULL) + return NULL; + ++ if (sect->common.flags & SECTION_MERGE) ++ return NULL; ++ + object_block **slot + = object_block_htab->find_slot_with_hash (sect, hash_section (sect), + INSERT); +@@ -7014,14 +7021,13 @@ default_asm_output_anchor (rtx symbol) + bool + default_use_anchors_for_symbol_p (const_rtx symbol) + { +- section *sect; + tree decl; ++ section *sect = SYMBOL_REF_BLOCK (symbol)->sect; + +- /* Don't use anchors for mergeable sections. The linker might move +- the objects around. */ +- sect = SYMBOL_REF_BLOCK (symbol)->sect; +- if (sect->common.flags & SECTION_MERGE) +- return false; ++ /* This function should only be called with non-zero SYMBOL_REF_BLOCK, ++ furthermore get_block_for_section should not create object blocks ++ for mergeable sections. */ ++ gcc_checking_assert (sect && !(sect->common.flags & SECTION_MERGE)); + + /* Don't use anchors for small data sections. The small data register + acts as an anchor for such sections. */ +@@ -7630,6 +7636,7 @@ output_object_block (struct object_block + else + switch_to_section (block->sect); + ++ gcc_checking_assert (!(block->sect->common.flags & SECTION_MERGE)); + assemble_align (block->alignment); + + /* Define the values of all anchors relative to the current section diff --git a/gcc9-pr89506.patch b/gcc9-pr89506.patch new file mode 100644 index 0000000..3b1f0bb --- /dev/null +++ b/gcc9-pr89506.patch @@ -0,0 +1,71 @@ +2019-02-26 Jakub Jelinek + + PR target/89506 + * config/arm/arm.md (cmpsi2_addneg): Use + trunc_int_for_mode (-INTVAL (...), SImode) instead of -INTVAL (...). + (*subsi3_carryin_compare_const): Similarly, just instead of -UINTVAL. + (*compare_scc splitter): Use gen_int_mode. + (*negscc): Likewise. + + * gcc.dg/pr89506.c: New test. + +--- gcc/config/arm/arm.md.jj 2019-02-25 11:32:02.914684615 +0100 ++++ gcc/config/arm/arm.md 2019-02-26 14:41:41.128767480 +0100 +@@ -867,7 +867,9 @@ (define_insn "cmpsi2_addneg" + (set (match_operand:SI 0 "s_register_operand" "=r,r") + (plus:SI (match_dup 1) + (match_operand:SI 3 "arm_addimm_operand" "I,L")))] +- "TARGET_32BIT && INTVAL (operands[2]) == -INTVAL (operands[3])" ++ "TARGET_32BIT ++ && (INTVAL (operands[2]) ++ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" + "@ + adds%?\\t%0, %1, %3 + subs%?\\t%0, %1, #%n3" +@@ -1185,7 +1187,9 @@ (define_insn "*subsi3_carryin_compare_co + (minus:SI (plus:SI (match_dup 1) + (match_operand:SI 3 "arm_neg_immediate_operand" "L")) + (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))))] +- "TARGET_32BIT && UINTVAL (operands[2]) == -UINTVAL (operands[3])" ++ "TARGET_32BIT ++ && (INTVAL (operands[2]) ++ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" + "sbcs\\t%0, %1, #%n3" + [(set_attr "conds" "set") + (set_attr "type" "adcs_imm")] +@@ -9281,7 +9285,7 @@ (define_split + (cond_exec (ne:CC (reg:CC CC_REGNUM) (const_int 0)) + (set (match_dup 0) (const_int 1)))] + { +- operands[3] = GEN_INT (-INTVAL (operands[2])); ++ operands[3] = gen_int_mode (-INTVAL (operands[2]), SImode); + }) + + (define_split +@@ -10061,7 +10065,8 @@ (define_insn_and_split "*negscc" + /* Emit subs\\t%0, %1, %2\;mvnne\\t%0, #0 */ + if (CONST_INT_P (operands[2])) + emit_insn (gen_cmpsi2_addneg (operands[0], operands[1], operands[2], +- GEN_INT (- INTVAL (operands[2])))); ++ gen_int_mode (-INTVAL (operands[2]), ++ SImode))); + else + emit_insn (gen_subsi3_compare (operands[0], operands[1], operands[2])); + +--- gcc/testsuite/gcc.dg/pr89506.c.jj 2019-02-26 14:45:29.662027068 +0100 ++++ gcc/testsuite/gcc.dg/pr89506.c 2019-02-26 14:45:06.570405009 +0100 +@@ -0,0 +1,14 @@ ++/* PR target/89506 */ ++/* { dg-do compile } */ ++/* { dg-options "-Og -g -w" } */ ++ ++long long a; ++int c; ++ ++int ++foo (long long d, short e) ++{ ++ __builtin_sub_overflow (0xffffffff, c, &a); ++ e >>= ~2147483647 != (int) a; ++ return d + e; ++} diff --git a/sources b/sources index dc0ac02..c825d19 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-9.0.1-20190221.tar.xz) = 2a83371869c2b5cc52b789236db2a55cf59294e0a8e7ae1e44d4dac873bbecd7daa33bcd15c0a7bce2941f8c68329de1f88d6ac09effb3c9e04f76902227a3b9 +SHA512 (gcc-9.0.1-20190227.tar.xz) = 0d42138bc1d2ac54fabf7e7d680a3492283955b869ec4ab1576e2d88a6d4ee7283e45a16a1b1db14dbdd6096da86461d81461bf8db70c4c65451529c7dc46145 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1 From fc147e70c09df9fedfaca5e5be36677668f2aa04 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 27 Feb 2019 15:46:10 +0100 Subject: [PATCH 04/10] 9.0.1-0.8 --- gcc9-pr89014.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc9-pr89014.patch b/gcc9-pr89014.patch index 6720ec9..b7633dc 100644 --- a/gcc9-pr89014.patch +++ b/gcc9-pr89014.patch @@ -1,12 +1,12 @@ --- gcc/config/aarch64/aarch64-option-extensions.def +++ gcc/config/aarch64/aarch64-option-extensions.def -@@ -43,7 +43,8 @@ - the extension (for example, the 'crypto' extension depends on four - entries: aes, pmull, sha1, sha2 being present). In that case this field - should contain a space (" ") separated list of the strings in 'Features' -- that are required. Their order is not important. */ -+ that are required. Their order is not important. An empty string means -+ do not detect this feature during auto detection. */ +@@ -44,7 +44,8 @@ + the extension (for example, the 'crypto' extension depends on four + entries: aes, pmull, sha1, sha2 being present). In that case this field + should contain a space (" ") separated list of the strings in 'Features' +- that are required. Their order is not important. */ ++ that are required. Their order is not important. An empty string means ++ do not detect this feature during auto detection. */ /* Enabling "fp" just enables "fp". Disabling "fp" also disables "simd", "crypto", "fp16", "aes", "sha2", From f790525becba2144501f25c356996b2b3d001992 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 27 Feb 2019 18:36:39 +0100 Subject: [PATCH 05/10] 9.0.1-0.9 --- gcc.spec | 6 ++-- gcc9-pr89434.patch | 20 +++++++++++++ gcc9-pr89506.patch | 71 ---------------------------------------------- 3 files changed, 22 insertions(+), 75 deletions(-) create mode 100644 gcc9-pr89434.patch delete mode 100644 gcc9-pr89506.patch diff --git a/gcc.spec b/gcc.spec index ec5b94e..b82dae7 100644 --- a/gcc.spec +++ b/gcc.spec @@ -258,7 +258,7 @@ Patch12: gcc9-pr89014.patch Patch13: gcc9-pr89093.patch Patch14: gcc9-pr70341.patch Patch15: gcc9-pr89490.patch -Patch16: gcc9-pr89506.patch +Patch16: gcc9-pr89434.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -773,7 +773,7 @@ to NVidia PTX capable devices if available. %patch13 -p0 -b .pr89093~ %patch14 -p0 -b .pr70341~ %patch15 -p0 -b .pr89490~ -%patch16 -p0 -b .pr89506~ +%patch16 -p0 -b .pr89434~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -2984,8 +2984,6 @@ end - improve arm and aarch64 casesi (PR target/70341) - don't use section anchors block infrastructure for mergeable section data (PR rtl-optimization/89490) -- fix arm cmpsi2_addneg and subsi3_carryin_compare_const patterns - and corresponding splitters (PR target/89506) * Thu Feb 21 2019 Jakub Jelinek 9.0.1-0.7 - update from trunk diff --git a/gcc9-pr89434.patch b/gcc9-pr89434.patch new file mode 100644 index 0000000..16e1a02 --- /dev/null +++ b/gcc9-pr89434.patch @@ -0,0 +1,20 @@ +2019-02-27 Jakub Jelinek + + PR target/89434 + * config/arm/arm.md (*subsi3_carryin_compare_const): Use + trunc_int_for_mode (-INTVAL (...), SImode), just instead of + -UINTVAL (...). + +--- gcc/config/arm/arm.md.jj 2019-02-25 11:32:02.914684615 +0100 ++++ gcc/config/arm/arm.md 2019-02-26 14:41:41.128767480 +0100 +@@ -1185,7 +1187,9 @@ (define_insn "*subsi3_carryin_compare_co + (minus:SI (plus:SI (match_dup 1) + (match_operand:SI 3 "arm_neg_immediate_operand" "L")) + (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))))] +- "TARGET_32BIT && UINTVAL (operands[2]) == -UINTVAL (operands[3])" ++ "TARGET_32BIT ++ && (INTVAL (operands[2]) ++ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" + "sbcs\\t%0, %1, #%n3" + [(set_attr "conds" "set") + (set_attr "type" "adcs_imm")] diff --git a/gcc9-pr89506.patch b/gcc9-pr89506.patch deleted file mode 100644 index 3b1f0bb..0000000 --- a/gcc9-pr89506.patch +++ /dev/null @@ -1,71 +0,0 @@ -2019-02-26 Jakub Jelinek - - PR target/89506 - * config/arm/arm.md (cmpsi2_addneg): Use - trunc_int_for_mode (-INTVAL (...), SImode) instead of -INTVAL (...). - (*subsi3_carryin_compare_const): Similarly, just instead of -UINTVAL. - (*compare_scc splitter): Use gen_int_mode. - (*negscc): Likewise. - - * gcc.dg/pr89506.c: New test. - ---- gcc/config/arm/arm.md.jj 2019-02-25 11:32:02.914684615 +0100 -+++ gcc/config/arm/arm.md 2019-02-26 14:41:41.128767480 +0100 -@@ -867,7 +867,9 @@ (define_insn "cmpsi2_addneg" - (set (match_operand:SI 0 "s_register_operand" "=r,r") - (plus:SI (match_dup 1) - (match_operand:SI 3 "arm_addimm_operand" "I,L")))] -- "TARGET_32BIT && INTVAL (operands[2]) == -INTVAL (operands[3])" -+ "TARGET_32BIT -+ && (INTVAL (operands[2]) -+ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" - "@ - adds%?\\t%0, %1, %3 - subs%?\\t%0, %1, #%n3" -@@ -1185,7 +1187,9 @@ (define_insn "*subsi3_carryin_compare_co - (minus:SI (plus:SI (match_dup 1) - (match_operand:SI 3 "arm_neg_immediate_operand" "L")) - (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))))] -- "TARGET_32BIT && UINTVAL (operands[2]) == -UINTVAL (operands[3])" -+ "TARGET_32BIT -+ && (INTVAL (operands[2]) -+ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" - "sbcs\\t%0, %1, #%n3" - [(set_attr "conds" "set") - (set_attr "type" "adcs_imm")] -@@ -9281,7 +9285,7 @@ (define_split - (cond_exec (ne:CC (reg:CC CC_REGNUM) (const_int 0)) - (set (match_dup 0) (const_int 1)))] - { -- operands[3] = GEN_INT (-INTVAL (operands[2])); -+ operands[3] = gen_int_mode (-INTVAL (operands[2]), SImode); - }) - - (define_split -@@ -10061,7 +10065,8 @@ (define_insn_and_split "*negscc" - /* Emit subs\\t%0, %1, %2\;mvnne\\t%0, #0 */ - if (CONST_INT_P (operands[2])) - emit_insn (gen_cmpsi2_addneg (operands[0], operands[1], operands[2], -- GEN_INT (- INTVAL (operands[2])))); -+ gen_int_mode (-INTVAL (operands[2]), -+ SImode))); - else - emit_insn (gen_subsi3_compare (operands[0], operands[1], operands[2])); - ---- gcc/testsuite/gcc.dg/pr89506.c.jj 2019-02-26 14:45:29.662027068 +0100 -+++ gcc/testsuite/gcc.dg/pr89506.c 2019-02-26 14:45:06.570405009 +0100 -@@ -0,0 +1,14 @@ -+/* PR target/89506 */ -+/* { dg-do compile } */ -+/* { dg-options "-Og -g -w" } */ -+ -+long long a; -+int c; -+ -+int -+foo (long long d, short e) -+{ -+ __builtin_sub_overflow (0xffffffff, c, &a); -+ e >>= ~2147483647 != (int) a; -+ return d + e; -+} From bad9bc25a419ea40f971eca7b6468a09ddcf3720 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 9 Mar 2019 11:52:56 +0100 Subject: [PATCH 06/10] 9.0.1-0.9 --- .gitignore | 1 + gcc.spec | 49 ++++++++---- gcc9-pr70341.patch | 187 --------------------------------------------- gcc9-pr89014.patch | 42 ---------- gcc9-pr89434.patch | 20 ----- gcc9-pr89490.patch | 60 --------------- gcc9-pr89629.patch | 17 +++++ sources | 2 +- 8 files changed, 54 insertions(+), 324 deletions(-) delete mode 100644 gcc9-pr70341.patch delete mode 100644 gcc9-pr89014.patch delete mode 100644 gcc9-pr89434.patch delete mode 100644 gcc9-pr89490.patch create mode 100644 gcc9-pr89629.patch diff --git a/.gitignore b/.gitignore index d930a11..2730767 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ /gcc-9.0.1-20190219.tar.xz /gcc-9.0.1-20190221.tar.xz /gcc-9.0.1-20190227.tar.xz +/gcc-9.0.1-20190309.tar.xz diff --git a/gcc.spec b/gcc.spec index b82dae7..d4d59e2 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20190227 -%global SVNREV 269254 +%global DATE 20190309 +%global SVNREV 269524 %global gcc_version 9.0.1 %global gcc_major 9 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.8 +%global gcc_release 0.9 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -254,11 +254,8 @@ Patch8: gcc9-foffload-default.patch Patch9: gcc9-Wno-format-security.patch Patch10: gcc9-rh1574936.patch Patch11: gcc9-d-shared-libphobos.patch -Patch12: gcc9-pr89014.patch -Patch13: gcc9-pr89093.patch -Patch14: gcc9-pr70341.patch -Patch15: gcc9-pr89490.patch -Patch16: gcc9-pr89434.patch +Patch12: gcc9-pr89093.patch +Patch13: gcc9-pr89629.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -769,11 +766,8 @@ to NVidia PTX capable devices if available. %patch10 -p0 -b .rh1574936~ %endif %patch11 -p0 -b .d-shared-libphobos~ -%patch12 -p0 -b .pr89014~ -%patch13 -p0 -b .pr89093~ -%patch14 -p0 -b .pr70341~ -%patch15 -p0 -b .pr89490~ -%patch16 -p0 -b .pr89434~ +%patch12 -p0 -b .pr89093~ +%patch13 -p0 -b .pr89629~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -1888,7 +1882,7 @@ echo gcc-%{version}-%{release}.%{_arch} > $FULLPATH/rpmver cd obj-%{gcc_target_platform} # run the tests. -make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \ +LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ \ %if 0%{?fedora} >= 20 || 0%{?rhel} > 7 RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" || : %else @@ -2962,6 +2956,33 @@ end %endif %changelog +* Sat Mar 9 2019 Jakub Jelinek 9.0.1-0.9 +- update from trunk + - PRs bootstrap/89539, bootstrap/89560, c++/22149, c++/63540, c++/71446, + c++/80916, c++/82075, c++/84518, c++/84605, c++/86485, c++/86969, + c++/87068, c++/87148, c++/87378, c++/88049, c++/88123, c++/88183, + c++/88820, c++/88857, c++/89381, c++/89511, c++/89513, c++/89522, + c++/89532, c++/89537, c++/89576, c++/89585, c++/89599, c++/89622, + c/85870, c/89520, c/89521, c/89525, debug/89631, fortran/71203, + fortran/72714, fortran/77583, fortran/89433, fortran/89516, + gcov-profile/89577, go/63560, go/89227, go/89406, ipa/80000, + ipa/88235, libgfortran/89593, libstdc++/86655, libstdc++/88996, + libstdc++/89562, libstdc++/89608, lto/87525, lto/88585, + middle-end/89497, middle-end/89503, middle-end/89541, + middle-end/89572, middle-end/89578, middle-end/89590, + middle-end/89618, other/80058, rtl-optimization/85899, + rtl-optimization/88845, rtl-optimization/89634, sanitizer/88684, + target/68924, target/78782, target/79645, target/79846, target/79926, + target/80003, target/80190, target/85665, target/86952, target/87558, + target/89222, target/89455, target/89506, target/89517, target/89587, + target/89602, testsuite/89441, testsuite/89551, translation/79999, + tree-optimization/89437, tree-optimization/89487, + tree-optimization/89535, tree-optimization/89536, + tree-optimization/89550, tree-optimization/89566, + tree-optimization/89570, tree-optimization/89594, + tree-optimization/89595 +- fix libstdc++ hashing of > 2GB strings (PR libstdc++/89629) + * Wed Feb 27 2019 Jakub Jelinek 9.0.1-0.8 - update from trunk - PRs c++/84585, c++/84676, c++/87685, c++/88294, c++/88394, c++/88419, diff --git a/gcc9-pr70341.patch b/gcc9-pr70341.patch deleted file mode 100644 index 2db1d9c..0000000 --- a/gcc9-pr70341.patch +++ /dev/null @@ -1,187 +0,0 @@ -2019-02-23 Jakub Jelinek - - PR target/70341 - * config/arm/arm.md (arm_casesi_internal): New define_expand. Rename - old define_insn to ... - (*arm_casesi_internal): ... this. Add mode to LABEL_REFs. - * config/arm/thumb2.md (thumb2_casesi_internal): New define_expand. - Rename old define_insn to ... - (*thumb2_casesi_internal): ... this. Add mode to LABEL_REFs. - (thumb2_casesi_internal_pic): New define_expand. Rename old - define_insn to ... - (*thumb2_casesi_internal_pic): ... this. Add mode to LABEL_REFs. - * config/aarch64/aarch64.md (casesi): Create the casesi_dispatch - MEM manually here, set MEM_READONLY_P and MEM_NOTRAP_P on it. - ---- gcc/config/arm/arm.md.jj 2019-02-18 20:48:32.643732307 +0100 -+++ gcc/config/arm/arm.md 2019-02-21 14:40:50.603452028 +0100 -@@ -8914,16 +8914,35 @@ (define_expand "casesi" - - ;; The USE in this pattern is needed to tell flow analysis that this is - ;; a CASESI insn. It has no other purpose. --(define_insn "arm_casesi_internal" -+(define_expand "arm_casesi_internal" -+ [(parallel [(set (pc) -+ (if_then_else -+ (leu (match_operand:SI 0 "s_register_operand") -+ (match_operand:SI 1 "arm_rhs_operand")) -+ (match_dup 4) -+ (label_ref:SI (match_operand 3 "")))) -+ (clobber (reg:CC CC_REGNUM)) -+ (use (label_ref:SI (match_operand 2 "")))])] -+ "TARGET_ARM" -+{ -+ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); -+ operands[4] = gen_rtx_PLUS (SImode, operands[4], -+ gen_rtx_LABEL_REF (SImode, operands[2])); -+ operands[4] = gen_rtx_MEM (SImode, operands[4]); -+ MEM_READONLY_P (operands[4]) = 1; -+ MEM_NOTRAP_P (operands[4]) = 1; -+}) -+ -+(define_insn "*arm_casesi_internal" - [(parallel [(set (pc) - (if_then_else - (leu (match_operand:SI 0 "s_register_operand" "r") - (match_operand:SI 1 "arm_rhs_operand" "rI")) - (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) -- (label_ref (match_operand 2 "" "")))) -- (label_ref (match_operand 3 "" "")))) -+ (label_ref:SI (match_operand 2 "" "")))) -+ (label_ref:SI (match_operand 3 "" "")))) - (clobber (reg:CC CC_REGNUM)) -- (use (label_ref (match_dup 2)))])] -+ (use (label_ref:SI (match_dup 2)))])] - "TARGET_ARM" - "* - if (flag_pic) ---- gcc/config/arm/thumb2.md.jj 2019-01-01 12:37:28.280792453 +0100 -+++ gcc/config/arm/thumb2.md 2019-02-21 15:00:26.811137210 +0100 -@@ -1079,17 +1079,37 @@ (define_insn "thumb2_zero_extendqisi2_v6 - (set_attr "neg_pool_range" "*,250")] - ) - --(define_insn "thumb2_casesi_internal" -+(define_expand "thumb2_casesi_internal" -+ [(parallel [(set (pc) -+ (if_then_else -+ (leu (match_operand:SI 0 "s_register_operand") -+ (match_operand:SI 1 "arm_rhs_operand")) -+ (match_dup 4) -+ (label_ref:SI (match_operand 3 "")))) -+ (clobber (reg:CC CC_REGNUM)) -+ (clobber (match_scratch:SI 5)) -+ (use (label_ref:SI (match_operand 2 "")))])] -+ "TARGET_THUMB2 && !flag_pic" -+{ -+ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); -+ operands[4] = gen_rtx_PLUS (SImode, operands[4], -+ gen_rtx_LABEL_REF (SImode, operands[2])); -+ operands[4] = gen_rtx_MEM (SImode, operands[4]); -+ MEM_READONLY_P (operands[4]) = 1; -+ MEM_NOTRAP_P (operands[4]) = 1; -+}) -+ -+(define_insn "*thumb2_casesi_internal" - [(parallel [(set (pc) - (if_then_else - (leu (match_operand:SI 0 "s_register_operand" "r") - (match_operand:SI 1 "arm_rhs_operand" "rI")) - (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) -- (label_ref (match_operand 2 "" "")))) -- (label_ref (match_operand 3 "" "")))) -+ (label_ref:SI (match_operand 2 "" "")))) -+ (label_ref:SI (match_operand 3 "" "")))) - (clobber (reg:CC CC_REGNUM)) - (clobber (match_scratch:SI 4 "=&r")) -- (use (label_ref (match_dup 2)))])] -+ (use (label_ref:SI (match_dup 2)))])] - "TARGET_THUMB2 && !flag_pic" - "* return thumb2_output_casesi(operands);" - [(set_attr "conds" "clob") -@@ -1097,18 +1117,39 @@ (define_insn "thumb2_casesi_internal" - (set_attr "type" "multiple")] - ) - --(define_insn "thumb2_casesi_internal_pic" -+(define_expand "thumb2_casesi_internal_pic" -+ [(parallel [(set (pc) -+ (if_then_else -+ (leu (match_operand:SI 0 "s_register_operand") -+ (match_operand:SI 1 "arm_rhs_operand")) -+ (match_dup 4) -+ (label_ref:SI (match_operand 3 "")))) -+ (clobber (reg:CC CC_REGNUM)) -+ (clobber (match_scratch:SI 5)) -+ (clobber (match_scratch:SI 6)) -+ (use (label_ref:SI (match_operand 2 "")))])] -+ "TARGET_THUMB2 && flag_pic" -+{ -+ operands[4] = gen_rtx_MULT (SImode, operands[0], GEN_INT (4)); -+ operands[4] = gen_rtx_PLUS (SImode, operands[4], -+ gen_rtx_LABEL_REF (SImode, operands[2])); -+ operands[4] = gen_rtx_MEM (SImode, operands[4]); -+ MEM_READONLY_P (operands[4]) = 1; -+ MEM_NOTRAP_P (operands[4]) = 1; -+}) -+ -+(define_insn "*thumb2_casesi_internal_pic" - [(parallel [(set (pc) - (if_then_else - (leu (match_operand:SI 0 "s_register_operand" "r") - (match_operand:SI 1 "arm_rhs_operand" "rI")) - (mem:SI (plus:SI (mult:SI (match_dup 0) (const_int 4)) -- (label_ref (match_operand 2 "" "")))) -- (label_ref (match_operand 3 "" "")))) -+ (label_ref:SI (match_operand 2 "" "")))) -+ (label_ref:SI (match_operand 3 "" "")))) - (clobber (reg:CC CC_REGNUM)) - (clobber (match_scratch:SI 4 "=&r")) - (clobber (match_scratch:SI 5 "=r")) -- (use (label_ref (match_dup 2)))])] -+ (use (label_ref:SI (match_dup 2)))])] - "TARGET_THUMB2 && flag_pic" - "* return thumb2_output_casesi(operands);" - [(set_attr "conds" "clob") ---- gcc/config/aarch64/aarch64.md.jj 2019-01-19 09:39:18.847831222 +0100 -+++ gcc/config/aarch64/aarch64.md 2019-02-21 15:25:27.874532191 +0100 -@@ -622,13 +622,27 @@ (define_expand "casesi" - operands[0], operands[2], operands[4])); - - operands[2] = force_reg (DImode, gen_rtx_LABEL_REF (DImode, operands[3])); -- emit_jump_insn (gen_casesi_dispatch (operands[2], operands[0], -- operands[3])); -+ operands[2] -+ = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, operands[2], operands[0]), -+ UNSPEC_CASESI); -+ operands[2] = gen_rtx_MEM (DImode, operands[2]); -+ MEM_READONLY_P (operands[2]) = 1; -+ MEM_NOTRAP_P (operands[2]) = 1; -+ emit_jump_insn (gen_casesi_dispatch (operands[2], operands[3])); - DONE; - } - ) - --(define_insn "casesi_dispatch" -+(define_expand "casesi_dispatch" -+ [(parallel -+ [(set (pc) (match_operand:DI 0 "")) -+ (clobber (reg:CC CC_REGNUM)) -+ (clobber (match_scratch:DI 2)) -+ (clobber (match_scratch:DI 3)) -+ (use (label_ref:DI (match_operand 1 "")))])] -+ "") -+ -+(define_insn "*casesi_dispatch" - [(parallel - [(set (pc) - (mem:DI (unspec [(match_operand:DI 0 "register_operand" "r") -@@ -637,7 +651,7 @@ (define_insn "casesi_dispatch" - (clobber (reg:CC CC_REGNUM)) - (clobber (match_scratch:DI 3 "=r")) - (clobber (match_scratch:DI 4 "=r")) -- (use (label_ref (match_operand 2 "" "")))])] -+ (use (label_ref:DI (match_operand 2 "" "")))])] - "" - "* - return aarch64_output_casesi (operands); diff --git a/gcc9-pr89014.patch b/gcc9-pr89014.patch deleted file mode 100644 index b7633dc..0000000 --- a/gcc9-pr89014.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- gcc/config/aarch64/aarch64-option-extensions.def -+++ gcc/config/aarch64/aarch64-option-extensions.def -@@ -44,7 +44,8 @@ - the extension (for example, the 'crypto' extension depends on four - entries: aes, pmull, sha1, sha2 being present). In that case this field - should contain a space (" ") separated list of the strings in 'Features' -- that are required. Their order is not important. */ -+ that are required. Their order is not important. An empty string means -+ do not detect this feature during auto detection. */ - - /* Enabling "fp" just enables "fp". - Disabling "fp" also disables "simd", "crypto", "fp16", "aes", "sha2", ---- gcc/config/aarch64/driver-aarch64.c -+++ gcc/config/aarch64/driver-aarch64.c -@@ -253,6 +253,12 @@ host_detect_local_cpu (int argc, const char **argv) - char *p = NULL; - char *feat_string - = concat (aarch64_extensions[i].feat_string, NULL); -+ -+ /* If the feature contains no HWCAPS string then ignore it for the -+ auto detection. */ -+ if (strlen (feat_string) == 0) -+ continue; -+ - bool enabled = true; - - /* This may be a multi-token feature string. We need ---- gcc/testsuite/gcc.target/aarch64/options_set_10.c -+++ gcc/testsuite/gcc.target/aarch64/options_set_10.c -@@ -0,0 +1,11 @@ -+/* { dg-do compile { target "aarch64*-*-linux*" } } */ -+/* { dg-additional-options "-mcpu=native" } */ -+ -+int main () -+{ -+ return 0; -+} -+ -+/* { dg-final { scan-assembler-not {\.arch .+\+profile.*} } } */ -+ -+ /* Check that an empty feature string is not detected during mcpu=native. */ - diff --git a/gcc9-pr89434.patch b/gcc9-pr89434.patch deleted file mode 100644 index 16e1a02..0000000 --- a/gcc9-pr89434.patch +++ /dev/null @@ -1,20 +0,0 @@ -2019-02-27 Jakub Jelinek - - PR target/89434 - * config/arm/arm.md (*subsi3_carryin_compare_const): Use - trunc_int_for_mode (-INTVAL (...), SImode), just instead of - -UINTVAL (...). - ---- gcc/config/arm/arm.md.jj 2019-02-25 11:32:02.914684615 +0100 -+++ gcc/config/arm/arm.md 2019-02-26 14:41:41.128767480 +0100 -@@ -1185,7 +1187,9 @@ (define_insn "*subsi3_carryin_compare_co - (minus:SI (plus:SI (match_dup 1) - (match_operand:SI 3 "arm_neg_immediate_operand" "L")) - (ltu:SI (reg:CC_C CC_REGNUM) (const_int 0))))] -- "TARGET_32BIT && UINTVAL (operands[2]) == -UINTVAL (operands[3])" -+ "TARGET_32BIT -+ && (INTVAL (operands[2]) -+ == trunc_int_for_mode (-INTVAL (operands[3]), SImode))" - "sbcs\\t%0, %1, #%n3" - [(set_attr "conds" "set") - (set_attr "type" "adcs_imm")] diff --git a/gcc9-pr89490.patch b/gcc9-pr89490.patch deleted file mode 100644 index 38df53c..0000000 --- a/gcc9-pr89490.patch +++ /dev/null @@ -1,60 +0,0 @@ -2019-02-27 Bernd Edlinger - - PR rtl-optimization/89490 - * varasm.c (get_block_for_section): Bail out for mergeable sections. - (default_use_anchors_for_symbol_p, output_object_block): Assert the - block section is not mergeable. - ---- gcc/varasm.c.orig 2019-02-21 23:50:24.000000000 +0100 -+++ gcc/varasm.c 2019-02-27 11:33:32.741967812 +0100 -@@ -363,7 +363,11 @@ use_object_blocks_p (void) - - /* Return the object_block structure for section SECT. Create a new - structure if we haven't created one already. Return null if SECT -- itself is null. */ -+ itself is null. Return also null for mergeable sections since -+ section anchors can't be used in mergeable sections anyway, -+ because the linker might move objects around, and using the -+ object blocks infrastructure in that case is both a waste and a -+ maintenance burden. */ - - static struct object_block * - get_block_for_section (section *sect) -@@ -373,6 +377,9 @@ get_block_for_section (section *sect) - if (sect == NULL) - return NULL; - -+ if (sect->common.flags & SECTION_MERGE) -+ return NULL; -+ - object_block **slot - = object_block_htab->find_slot_with_hash (sect, hash_section (sect), - INSERT); -@@ -7014,14 +7021,13 @@ default_asm_output_anchor (rtx symbol) - bool - default_use_anchors_for_symbol_p (const_rtx symbol) - { -- section *sect; - tree decl; -+ section *sect = SYMBOL_REF_BLOCK (symbol)->sect; - -- /* Don't use anchors for mergeable sections. The linker might move -- the objects around. */ -- sect = SYMBOL_REF_BLOCK (symbol)->sect; -- if (sect->common.flags & SECTION_MERGE) -- return false; -+ /* This function should only be called with non-zero SYMBOL_REF_BLOCK, -+ furthermore get_block_for_section should not create object blocks -+ for mergeable sections. */ -+ gcc_checking_assert (sect && !(sect->common.flags & SECTION_MERGE)); - - /* Don't use anchors for small data sections. The small data register - acts as an anchor for such sections. */ -@@ -7630,6 +7636,7 @@ output_object_block (struct object_block - else - switch_to_section (block->sect); - -+ gcc_checking_assert (!(block->sect->common.flags & SECTION_MERGE)); - assemble_align (block->alignment); - - /* Define the values of all anchors relative to the current section diff --git a/gcc9-pr89629.patch b/gcc9-pr89629.patch new file mode 100644 index 0000000..ab20267 --- /dev/null +++ b/gcc9-pr89629.patch @@ -0,0 +1,17 @@ +2019-03-08 Jonathan Wakely + + PR libstdc++/89629 + * libsupc++/hash_bytes.cc (std::_Hash_bytes): Change len_aligned type + from int to size_t. + +--- libstdc++-v3/libsupc++/hash_bytes.cc ++++ libstdc++-v3/libsupc++/hash_bytes.cc +@@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + + // Remove the bytes not divisible by the sizeof(size_t). This + // allows the main loop to process the data as 64-bit integers. +- const int len_aligned = len & ~0x7; ++ const size_t len_aligned = len & ~0x7; + const char* const end = buf + len_aligned; + size_t hash = seed ^ (len * mul); + for (const char* p = buf; p != end; p += 8) diff --git a/sources b/sources index c825d19..d06cfdb 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-9.0.1-20190227.tar.xz) = 0d42138bc1d2ac54fabf7e7d680a3492283955b869ec4ab1576e2d88a6d4ee7283e45a16a1b1db14dbdd6096da86461d81461bf8db70c4c65451529c7dc46145 +SHA512 (gcc-9.0.1-20190309.tar.xz) = 84aadddc04c9f655c7ecaf90bb111da9aa82e0b4e937588f7e2c4089cb8d8e55c4ae9479fc0e46c0e2c9cd4738f8afcb178f3920528c0badb1c15c5aba54f0a1 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1 From 843493ecf71b5b48b3e5913198e44d7511758a78 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 12 Mar 2019 10:17:52 +0100 Subject: [PATCH 07/10] 9.0.1-0.10 --- .gitignore | 1 + gcc.spec | 26 +++++++++++++---- gcc9-pr89629.patch | 17 ------------ gcc9-pr89652.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++++ gcc9-pr89660.patch | 55 ++++++++++++++++++++++++++++++++++++ sources | 2 +- 6 files changed, 147 insertions(+), 23 deletions(-) delete mode 100644 gcc9-pr89629.patch create mode 100644 gcc9-pr89652.patch create mode 100644 gcc9-pr89660.patch diff --git a/.gitignore b/.gitignore index 2730767..159ca68 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ /gcc-9.0.1-20190221.tar.xz /gcc-9.0.1-20190227.tar.xz /gcc-9.0.1-20190309.tar.xz +/gcc-9.0.1-20190312.tar.xz diff --git a/gcc.spec b/gcc.spec index d4d59e2..874faad 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20190309 -%global SVNREV 269524 +%global DATE 20190312 +%global SVNREV 269606 %global gcc_version 9.0.1 %global gcc_major 9 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.9 +%global gcc_release 0.10 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -255,7 +255,8 @@ Patch9: gcc9-Wno-format-security.patch Patch10: gcc9-rh1574936.patch Patch11: gcc9-d-shared-libphobos.patch Patch12: gcc9-pr89093.patch -Patch13: gcc9-pr89629.patch +Patch13: gcc9-pr89652.patch +Patch14: gcc9-pr89660.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -767,7 +768,8 @@ to NVidia PTX capable devices if available. %endif %patch11 -p0 -b .d-shared-libphobos~ %patch12 -p0 -b .pr89093~ -%patch13 -p0 -b .pr89629~ +%patch13 -p0 -b .pr89652~ +%patch14 -p0 -b .pr89660~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -2956,6 +2958,20 @@ end %endif %changelog +* Tue Mar 12 2019 Jakub Jelinek 9.0.1-0.10 +- update from trunk + - PRs bootstrap/89656, c++/70349, c++/86521, c++/87571, c++/87750, + c++/89648, c/88568, contrib/82704, d/89041, fortran/66089, + fortran/71544, fortran/84504, fortran/87734, fortran/89639, + fortran/89651, inline-asm/87010, libbacktrace/89669, libstdc++/89460, + libstdc++/89641, middle-end/68733, middle-end/89655, middle-end/89663, + rtl-optimization/89588, testsuite/89472, tree-optimization/85459, + tree-optimization/85762, tree-optimization/87008, + tree-optimization/89649, tree-optimization/89664 +- fix ICE in constexpr loop handling of SAVE_EXPRs (PR c++/89652) +- temporarily revert -Wredundant-move warning false positive + improvement (PR c++/89660) + * Sat Mar 9 2019 Jakub Jelinek 9.0.1-0.9 - update from trunk - PRs bootstrap/89539, bootstrap/89560, c++/22149, c++/63540, c++/71446, diff --git a/gcc9-pr89629.patch b/gcc9-pr89629.patch deleted file mode 100644 index ab20267..0000000 --- a/gcc9-pr89629.patch +++ /dev/null @@ -1,17 +0,0 @@ -2019-03-08 Jonathan Wakely - - PR libstdc++/89629 - * libsupc++/hash_bytes.cc (std::_Hash_bytes): Change len_aligned type - from int to size_t. - ---- libstdc++-v3/libsupc++/hash_bytes.cc -+++ libstdc++-v3/libsupc++/hash_bytes.cc -@@ -139,7 +139,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - // Remove the bytes not divisible by the sizeof(size_t). This - // allows the main loop to process the data as 64-bit integers. -- const int len_aligned = len & ~0x7; -+ const size_t len_aligned = len & ~0x7; - const char* const end = buf + len_aligned; - size_t hash = seed ^ (len * mul); - for (const char* p = buf; p != end; p += 8) diff --git a/gcc9-pr89652.patch b/gcc9-pr89652.patch new file mode 100644 index 0000000..8fde67d --- /dev/null +++ b/gcc9-pr89652.patch @@ -0,0 +1,69 @@ +2019-03-12 Jakub Jelinek + + PR c++/89652 + * constexpr.c (cxx_eval_loop_expr): Only remove SAVE_EXPRs that are + still in new_ctx.values hash_map. + + * g++.dg/cpp1y/constexpr-89652.C: New test. + +--- gcc/cp/constexpr.c.jj 2019-03-08 08:43:23.529496048 +0100 ++++ gcc/cp/constexpr.c 2019-03-11 15:11:32.081334270 +0100 +@@ -4236,7 +4236,8 @@ cxx_eval_loop_expr (const constexpr_ctx + /* Forget saved values of SAVE_EXPRs. */ + for (hash_set::iterator iter = save_exprs.begin(); + iter != save_exprs.end(); ++iter) +- new_ctx.values->remove (*iter); ++ if (new_ctx.values->get (*iter)) ++ new_ctx.values->remove (*iter); + + if (++count >= constexpr_loop_limit) + { +@@ -4258,7 +4259,8 @@ cxx_eval_loop_expr (const constexpr_ctx + /* Forget saved values of SAVE_EXPRs. */ + for (hash_set::iterator iter = save_exprs.begin(); + iter != save_exprs.end(); ++iter) +- new_ctx.values->remove (*iter); ++ if (new_ctx.values->get (*iter)) ++ new_ctx.values->remove (*iter); + + return NULL_TREE; + } +--- gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C.jj 2019-03-11 15:14:21.877561575 +0100 ++++ gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C 2019-03-11 15:16:11.962763933 +0100 +@@ -0,0 +1,36 @@ ++// PR c++/89652 ++// { dg-do compile { target c++14 } } ++// { dg-options "" } ++ ++template constexpr auto foo (T &e) { return e.foo (); } ++template constexpr auto bar (T &e) { return foo (e); } ++template struct A { typedef T a[N]; }; ++template struct B { ++ typedef T *b; ++ typename A::a d; ++ constexpr b foo () { return d; } ++}; ++template struct C { long m; }; ++struct D { long n; }; ++template struct E { ++ B, 1>::b p; ++ constexpr D operator* () { return {p->m}; } ++ constexpr E operator++ (int) { auto a{*this}; ++p; return a; } ++}; ++template ++constexpr bool operator!= (E a, E) { return a.p; } ++template ++constexpr auto baz (B s, B) ++{ ++ B t{}; ++ auto q{foo (t)}; ++ using u = E; ++ auto v = u{bar (s)}; ++ auto w = u{}; ++ while (v != w) ++ *q++ = *v++; ++ return t; ++} ++constexpr auto a = B, 5>{}; ++auto b = B{}; ++auto c = baz (a, b); diff --git a/gcc9-pr89660.patch b/gcc9-pr89660.patch new file mode 100644 index 0000000..49234ab --- /dev/null +++ b/gcc9-pr89660.patch @@ -0,0 +1,55 @@ +2019-03-12 Jakub Jelinek + + PR c++/89660 + Revert: + 2019-03-06 Marek Polacek + + PR c++/87378 - bogus -Wredundant-move warning. + * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue + overload resolution would actually succeed. + + * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. + +--- gcc/cp/typeck.c (revision 269427) ++++ gcc/cp/typeck.c (revision 269426) +@@ -9429,24 +9429,10 @@ maybe_warn_pessimizing_move (tree retval + do maybe-rvalue overload resolution even without std::move. */ + else if (treat_lvalue_as_rvalue_p (arg, /*parm_ok*/true)) + { +- /* Make sure that the overload resolution would actually succeed +- if we removed the std::move call. */ +- tree t = convert_for_initialization (NULL_TREE, functype, +- move (arg), +- (LOOKUP_NORMAL +- | LOOKUP_ONLYCONVERTING +- | LOOKUP_PREFER_RVALUE), +- ICR_RETURN, NULL_TREE, 0, +- tf_none); +- /* If this worked, implicit rvalue would work, so the call to +- std::move is redundant. */ +- if (t != error_mark_node) +- { +- auto_diagnostic_group d; +- if (warning_at (loc, OPT_Wredundant_move, +- "redundant move in return statement")) +- inform (loc, "remove % call"); +- } ++ auto_diagnostic_group d; ++ if (warning_at (loc, OPT_Wredundant_move, ++ "redundant move in return statement")) ++ inform (loc, "remove % call"); + } + } + } +--- gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C (revision 269427) ++++ gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C (revision 269426) +@@ -59,8 +59,7 @@ T + fn4 (const T t) + { + // t is const: will decay into copy despite std::move, so it's redundant. +- // We used to warn about this, but no longer since c++/87378. +- return std::move (t); ++ return std::move (t); // { dg-warning "redundant move in return statement" } + } + + int diff --git a/sources b/sources index d06cfdb..57b494e 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-9.0.1-20190309.tar.xz) = 84aadddc04c9f655c7ecaf90bb111da9aa82e0b4e937588f7e2c4089cb8d8e55c4ae9479fc0e46c0e2c9cd4738f8afcb178f3920528c0badb1c15c5aba54f0a1 +SHA512 (gcc-9.0.1-20190312.tar.xz) = 23ef500528212ea4542398d6909548e6dc5e12a7e58c750895ce85ff5a24e6ed637fcb361a8c248b79e0c93ecbfb72606d07c004a02b891f2078c12e973f51f1 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1 From 1d6c11d8dfb11fe855ffd1688a0a6e8acaa392dd Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 12 Mar 2019 10:32:22 +0100 Subject: [PATCH 08/10] 9.0.1-0.10 --- gcc9-pr89093.patch | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc9-pr89093.patch b/gcc9-pr89093.patch index 78957e3..4ec2c06 100644 --- a/gcc9-pr89093.patch +++ b/gcc9-pr89093.patch @@ -55,15 +55,19 @@ --- gcc/config/arm/arm.c +++ gcc/config/arm/arm.c -@@ -3759,8 +3759,6 @@ arm_options_perform_arch_sanity_checks (void) +@@ -3761,11 +3761,7 @@ arm_options_perform_arch_sanity_checks ( + if (arm_abi == ARM_ABI_IWMMXT) + arm_pcs_default = ARM_PCS_AAPCS_IWMMXT; else if (TARGET_HARD_FLOAT_ABI) - { - arm_pcs_default = ARM_PCS_AAPCS_VFP; +- { +- arm_pcs_default = ARM_PCS_AAPCS_VFP; - if (!bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv2)) -- error ("-mfloat-abi=hard: selected processor lacks an FPU"); - } +- error ("%<-mfloat-abi=hard%>: selected processor lacks an FPU"); +- } ++ arm_pcs_default = ARM_PCS_AAPCS_VFP; else arm_pcs_default = ARM_PCS_AAPCS; + } --- libgcc/config/arm/pr-support.c +++ libgcc/config/arm/pr-support.c @@ -21,6 +21,8 @@ From 4d0e748417069443292cecced8e96de38a097333 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2019 13:17:36 +0100 Subject: [PATCH 09/10] Resolves: #1688766 --- gcc.spec | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/gcc.spec b/gcc.spec index 874faad..7d49003 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1266,36 +1266,39 @@ mkdir -p %{buildroot}/%{_lib} mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1 chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_major}-%{DATE}.so.1 ln -sf libgcc_s-%{gcc_major}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1 +%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le %{arm} +rm -f $FULLPATH/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so +%else ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so +%endif %ifarch sparcv9 ppc +%ifarch ppc +rm -f $FULLPATH/64/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -m64 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so +%else ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so %endif +%endif %ifarch %{multilib_64_archs} +%ifarch x86_64 ppc64 ppc64p7 +rm -f $FULLPATH/64/libgcc_s.so +echo '/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT('`gcc -m32 -Wl,--print-output-format -nostdlib -r -o /dev/null`') +GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so +%else ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so %endif -%ifarch ppc -rm -f $FULLPATH/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT(elf32-powerpc) -GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so -%endif -%ifarch ppc64 ppc64p7 -rm -f $FULLPATH/32/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT(elf32-powerpc) -GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so -%endif -%ifarch %{arm} -rm -f $FULLPATH/libgcc_s.so -echo '/* GNU ld script - Use the shared library, but some functions are only in - the static library, so try that secondarily. */ -OUTPUT_FORMAT(elf32-littlearm) -GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so %endif mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ @@ -2958,6 +2961,10 @@ end %endif %changelog +% Thu Mar 14 2019 Jakub Jelinek 9.0.1-0.11 +- turn libgcc_s.so into a linker script on i?86, x86_64, ppc64le and also on + ppc and ppc64 for 64-bit multilib (#1688766) + * Tue Mar 12 2019 Jakub Jelinek 9.0.1-0.10 - update from trunk - PRs bootstrap/89656, c++/70349, c++/86521, c++/87571, c++/87750, From 5c040740528feb6f13e175e25ec8fdf1e449b596 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 20 Mar 2019 13:45:09 +0100 Subject: [PATCH 10/10] 9.0.1-0.11 --- .gitignore | 1 + gcc.spec | 33 ++++++++++++++++------ gcc9-pr89652.patch | 69 ---------------------------------------------- gcc9-pr89660.patch | 55 ------------------------------------ sources | 2 +- 5 files changed, 27 insertions(+), 133 deletions(-) delete mode 100644 gcc9-pr89652.patch delete mode 100644 gcc9-pr89660.patch diff --git a/.gitignore b/.gitignore index 159ca68..8d0fe1d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ /gcc-9.0.1-20190227.tar.xz /gcc-9.0.1-20190309.tar.xz /gcc-9.0.1-20190312.tar.xz +/gcc-9.0.1-20190320.tar.xz diff --git a/gcc.spec b/gcc.spec index 7d49003..2c4fbf8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20190312 -%global SVNREV 269606 +%global DATE 20190320 +%global SVNREV 269820 %global gcc_version 9.0.1 %global gcc_major 9 # Note, gcc_release must be integer, if you want to add suffixes to # %%{release}, append them after %%{gcc_release} on Release: line. -%global gcc_release 0.10 +%global gcc_release 0.11 %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global _unpackaged_files_terminate_build 0 @@ -255,8 +255,6 @@ Patch9: gcc9-Wno-format-security.patch Patch10: gcc9-rh1574936.patch Patch11: gcc9-d-shared-libphobos.patch Patch12: gcc9-pr89093.patch -Patch13: gcc9-pr89652.patch -Patch14: gcc9-pr89660.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -768,8 +766,6 @@ to NVidia PTX capable devices if available. %endif %patch11 -p0 -b .d-shared-libphobos~ %patch12 -p0 -b .pr89093~ -%patch13 -p0 -b .pr89652~ -%patch14 -p0 -b .pr89660~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -2961,7 +2957,28 @@ end %endif %changelog -% Thu Mar 14 2019 Jakub Jelinek 9.0.1-0.11 +* Wed Mar 20 2019 Jakub Jelinek 9.0.1-0.11 +- update from trunk + - PRs c++/63508, c++/85014, c++/85558, c++/88534, c++/88537, c++/88979, + c++/89512, c++/89571, c++/89630, c++/89640, c++/89660, c++/89682, + c++/89686, c++/89709, c++/89761, c/89734, d/87866, d/88957, + debug/88389, debug/89498, debug/89704, fortran/60091, fortran/66695, + fortran/68009, fortran/77746, fortran/79485, fortran/84394, + fortran/87045, fortran/87673, fortran/88008, fortran/89363, + fortran/89364, fortran/89601, fortran/89724, ipa/89684, + libstdc++/89461, lto/87809, lto/89335, middle-end/86979, + middle-end/88588, middle-end/88945, middle-end/89677, + middle-end/89698, middle-end/89737, other/89712, + rtl-optimization/89679, rtl-optimization/89721, + rtl-optimization/89753, rtl-optimization/89768, sanitizer/80953, + target/52726, target/85860, target/87532, target/87561, target/89378, + target/89411, target/89523, target/89627, target/89650, target/89711, + target/89719, target/89726, target/89736, target/89746, target/89752, + testsuite/83453, testsuite/84174, testsuite/89393, testsuite/89471, + testsuite/89666, tree-optimization/89546, tree-optimization/89644, + tree-optimization/89662, tree-optimization/89688, + tree-optimization/89703, tree-optimization/89710, + tree-optimization/89720 - turn libgcc_s.so into a linker script on i?86, x86_64, ppc64le and also on ppc and ppc64 for 64-bit multilib (#1688766) diff --git a/gcc9-pr89652.patch b/gcc9-pr89652.patch deleted file mode 100644 index 8fde67d..0000000 --- a/gcc9-pr89652.patch +++ /dev/null @@ -1,69 +0,0 @@ -2019-03-12 Jakub Jelinek - - PR c++/89652 - * constexpr.c (cxx_eval_loop_expr): Only remove SAVE_EXPRs that are - still in new_ctx.values hash_map. - - * g++.dg/cpp1y/constexpr-89652.C: New test. - ---- gcc/cp/constexpr.c.jj 2019-03-08 08:43:23.529496048 +0100 -+++ gcc/cp/constexpr.c 2019-03-11 15:11:32.081334270 +0100 -@@ -4236,7 +4236,8 @@ cxx_eval_loop_expr (const constexpr_ctx - /* Forget saved values of SAVE_EXPRs. */ - for (hash_set::iterator iter = save_exprs.begin(); - iter != save_exprs.end(); ++iter) -- new_ctx.values->remove (*iter); -+ if (new_ctx.values->get (*iter)) -+ new_ctx.values->remove (*iter); - - if (++count >= constexpr_loop_limit) - { -@@ -4258,7 +4259,8 @@ cxx_eval_loop_expr (const constexpr_ctx - /* Forget saved values of SAVE_EXPRs. */ - for (hash_set::iterator iter = save_exprs.begin(); - iter != save_exprs.end(); ++iter) -- new_ctx.values->remove (*iter); -+ if (new_ctx.values->get (*iter)) -+ new_ctx.values->remove (*iter); - - return NULL_TREE; - } ---- gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C.jj 2019-03-11 15:14:21.877561575 +0100 -+++ gcc/testsuite/g++.dg/cpp1y/constexpr-89652.C 2019-03-11 15:16:11.962763933 +0100 -@@ -0,0 +1,36 @@ -+// PR c++/89652 -+// { dg-do compile { target c++14 } } -+// { dg-options "" } -+ -+template constexpr auto foo (T &e) { return e.foo (); } -+template constexpr auto bar (T &e) { return foo (e); } -+template struct A { typedef T a[N]; }; -+template struct B { -+ typedef T *b; -+ typename A::a d; -+ constexpr b foo () { return d; } -+}; -+template struct C { long m; }; -+struct D { long n; }; -+template struct E { -+ B, 1>::b p; -+ constexpr D operator* () { return {p->m}; } -+ constexpr E operator++ (int) { auto a{*this}; ++p; return a; } -+}; -+template -+constexpr bool operator!= (E a, E) { return a.p; } -+template -+constexpr auto baz (B s, B) -+{ -+ B t{}; -+ auto q{foo (t)}; -+ using u = E; -+ auto v = u{bar (s)}; -+ auto w = u{}; -+ while (v != w) -+ *q++ = *v++; -+ return t; -+} -+constexpr auto a = B, 5>{}; -+auto b = B{}; -+auto c = baz (a, b); diff --git a/gcc9-pr89660.patch b/gcc9-pr89660.patch deleted file mode 100644 index 49234ab..0000000 --- a/gcc9-pr89660.patch +++ /dev/null @@ -1,55 +0,0 @@ -2019-03-12 Jakub Jelinek - - PR c++/89660 - Revert: - 2019-03-06 Marek Polacek - - PR c++/87378 - bogus -Wredundant-move warning. - * typeck.c (maybe_warn_pessimizing_move): See if the maybe-rvalue - overload resolution would actually succeed. - - * g++.dg/cpp0x/Wredundant-move1.C (fn4): Drop dg-warning. - ---- gcc/cp/typeck.c (revision 269427) -+++ gcc/cp/typeck.c (revision 269426) -@@ -9429,24 +9429,10 @@ maybe_warn_pessimizing_move (tree retval - do maybe-rvalue overload resolution even without std::move. */ - else if (treat_lvalue_as_rvalue_p (arg, /*parm_ok*/true)) - { -- /* Make sure that the overload resolution would actually succeed -- if we removed the std::move call. */ -- tree t = convert_for_initialization (NULL_TREE, functype, -- move (arg), -- (LOOKUP_NORMAL -- | LOOKUP_ONLYCONVERTING -- | LOOKUP_PREFER_RVALUE), -- ICR_RETURN, NULL_TREE, 0, -- tf_none); -- /* If this worked, implicit rvalue would work, so the call to -- std::move is redundant. */ -- if (t != error_mark_node) -- { -- auto_diagnostic_group d; -- if (warning_at (loc, OPT_Wredundant_move, -- "redundant move in return statement")) -- inform (loc, "remove % call"); -- } -+ auto_diagnostic_group d; -+ if (warning_at (loc, OPT_Wredundant_move, -+ "redundant move in return statement")) -+ inform (loc, "remove % call"); - } - } - } ---- gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C (revision 269427) -+++ gcc/testsuite/g++.dg/cpp0x/Wredundant-move1.C (revision 269426) -@@ -59,8 +59,7 @@ T - fn4 (const T t) - { - // t is const: will decay into copy despite std::move, so it's redundant. -- // We used to warn about this, but no longer since c++/87378. -- return std::move (t); -+ return std::move (t); // { dg-warning "redundant move in return statement" } - } - - int diff --git a/sources b/sources index 57b494e..298fab6 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-9.0.1-20190312.tar.xz) = 23ef500528212ea4542398d6909548e6dc5e12a7e58c750895ce85ff5a24e6ed637fcb361a8c248b79e0c93ecbfb72606d07c004a02b891f2078c12e973f51f1 +SHA512 (gcc-9.0.1-20190320.tar.xz) = 20ca885e0afca0470142113271d47eed2876dd778c308f72c9fea86b58a69ab798a8b3b398f240b49a41907adb47446ba087171b75f079597bad3d4348436e18 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1