diff --git a/.gitignore b/.gitignore index d2667f9..0d3f871 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz /gcc-8.0.1-20180830.tar.xz /gcc-8.0.1-20180130.tar.xz +/gcc-8.0.1-20180131.tar.xz diff --git a/gcc.spec b/gcc.spec index 37e0450..21eb279 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,10 +1,10 @@ -%global DATE 20180130 -%global SVNREV 257210 +%global DATE 20180131 +%global SVNREV 257268 %global gcc_version 8.0.1 %global gcc_major 8 # 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 @@ -234,9 +234,8 @@ Patch8: gcc8-no-add-needed.patch Patch9: gcc8-aarch64-async-unw-tables.patch Patch10: gcc8-foffload-default.patch Patch11: gcc8-Wno-format-security.patch -Patch12: gcc8-aarch64-sanitizer-fix.patch -Patch13: gcc8-rh1512529-aarch64.patch -Patch14: gcc8-pr84131.patch +Patch12: gcc8-rh1512529-aarch64.patch +Patch13: gcc8-pr84146.patch Patch1000: nvptx-tools-no-ptxas.patch Patch1001: nvptx-tools-build.patch @@ -774,11 +773,8 @@ to NVidia PTX capable devices if available. %patch9 -p0 -b .aarch64-async-unw-tables~ %patch10 -p0 -b .foffload-default~ %patch11 -p0 -b .Wno-format-security~ -%if 0%{?fedora} > 27 -%patch12 -p0 -b .aarch64-sanitizer-fix~ -%endif -%patch13 -p0 -b .rh1512529-aarch64~ -%patch14 -p0 -b .pr84131~ +%patch12 -p0 -b .rh1512529-aarch64~ +%patch13 -p0 -b .pr84146~ cd nvptx-tools-%{nvptx_tools_gitrev} %patch1000 -p1 -b .nvptx-tools-no-ptxas~ @@ -3040,6 +3036,14 @@ fi %endif %changelog +* Wed Jan 31 2018 Jakub Jelinek 8.0.1-0.8 +- update from the trunk + - PRs c++/83993, c++/84092, c++/84138, c/84100, fortran/84088, + fortran/84116, fortran/84134, lto/84105, preprocessor/69869, + rtl-optimization/84071, target/82444, target/83618, target/84064, + tree-optimization/64946, tree-optimization/84132 +- fix ICE with CET and -g (PR target/84146) + * Tue Jan 30 2018 Jakub Jelinek 8.0.1-0.7 - update from the trunk - PRs bootstrap/80867, bootstrap/84017, c++/68810, c++/83924, c++/83942, diff --git a/gcc8-aarch64-sanitizer-fix.patch b/gcc8-aarch64-sanitizer-fix.patch deleted file mode 100644 index c1d8cba..0000000 --- a/gcc8-aarch64-sanitizer-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libsanitizer/sanitizer_common/sanitizer_linux.cc -+++ libsanitizer/sanitizer_common/sanitizer_linux.cc -@@ -1262,7 +1262,7 @@ struct __sanitizer_esr_context { - - static bool Aarch64GetESR(ucontext_t *ucontext, u64 *esr) { - static const u32 kEsrMagic = 0x45535201; -- u8 *aux = ucontext->uc_mcontext.__reserved; -+ u8 *aux = ucontext->uc_mcontext.__glibc_reserved1; - while (true) { - _aarch64_ctx *ctx = (_aarch64_ctx *)aux; - if (ctx->size == 0) break; diff --git a/gcc8-pr84131.patch b/gcc8-pr84131.patch deleted file mode 100644 index 12f6323..0000000 --- a/gcc8-pr84131.patch +++ /dev/null @@ -1,17 +0,0 @@ -2018-01-30 Jakub Jelinek - - PR debug/84131 - * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off - to DATA_FIELD's offset rather than OFFSET_FIELD's offset. - ---- gcc/fortran/trans-array.c.jj 2018-01-26 12:43:25.164922494 +0100 -+++ gcc/fortran/trans-array.c 2018-01-30 19:34:01.844232363 +0100 -@@ -511,7 +511,7 @@ gfc_get_descriptor_offsets_for_info (con - tree type; - - type = TYPE_MAIN_VARIANT (desc_type); -- field = gfc_advance_chain (TYPE_FIELDS (type), OFFSET_FIELD); -+ field = gfc_advance_chain (TYPE_FIELDS (type), DATA_FIELD); - *data_off = byte_position (field); - field = gfc_advance_chain (TYPE_FIELDS (type), DTYPE_FIELD); - *dtype_off = byte_position (field); diff --git a/gcc8-pr84146.patch b/gcc8-pr84146.patch new file mode 100644 index 0000000..8891c7b --- /dev/null +++ b/gcc8-pr84146.patch @@ -0,0 +1,79 @@ +2018-01-31 Jakub Jelinek + + PR target/84146 + * config/i386/i386.c (rest_of_insert_endbranch): Only skip + NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else, + and skip it regardless of bb boundaries. Use CALL_P macro, + don't test INSN_P (insn) together with CALL_P or JUMP_P check + unnecessarily, formatting fix. + + * gcc.target/i386/pr84146.c: New test. + +--- gcc/config/i386/i386.c.jj 2018-01-31 09:26:18.341505667 +0100 ++++ gcc/config/i386/i386.c 2018-01-31 14:13:33.815243832 +0100 +@@ -2609,31 +2609,27 @@ rest_of_insert_endbranch (void) + for (insn = BB_HEAD (bb); insn != NEXT_INSN (BB_END (bb)); + insn = NEXT_INSN (insn)) + { +- if (INSN_P (insn) && GET_CODE (insn) == CALL_INSN) ++ if (CALL_P (insn)) + { + if (find_reg_note (insn, REG_SETJMP, NULL) == NULL) + continue; + /* Generate ENDBRANCH after CALL, which can return more than + twice, setjmp-like functions. */ + +- /* Skip notes and debug insns that must be next to the +- call insn. ??? This might skip a lot more than +- that... ??? Skipping barriers and emitting code +- after them surely looks like a mistake; we probably +- won't ever hit it, for we'll hit BB_END first. */ ++ /* Skip notes that must immediately follow the call insn. */ + rtx_insn *next_insn = insn; +- while ((next_insn != BB_END (bb)) +- && (DEBUG_INSN_P (NEXT_INSN (next_insn)) +- || NOTE_P (NEXT_INSN (next_insn)) +- || BARRIER_P (NEXT_INSN (next_insn)))) +- next_insn = NEXT_INSN (next_insn); ++ if (NEXT_INSN (insn) ++ && NOTE_P (NEXT_INSN (insn)) ++ && (NOTE_KIND (NEXT_INSN (insn)) ++ == NOTE_INSN_CALL_ARG_LOCATION)) ++ next_insn = NEXT_INSN (insn); + + cet_eb = gen_nop_endbr (); + emit_insn_after_setloc (cet_eb, next_insn, INSN_LOCATION (insn)); + continue; + } + +- if (INSN_P (insn) && JUMP_P (insn) && flag_cet_switch) ++ if (JUMP_P (insn) && flag_cet_switch) + { + rtx target = JUMP_LABEL (insn); + if (target == NULL_RTX || ANY_RETURN_P (target)) +@@ -2668,7 +2664,7 @@ rest_of_insert_endbranch (void) + if ((LABEL_P (insn) && LABEL_PRESERVE_P (insn)) + || (NOTE_P (insn) + && NOTE_KIND (insn) == NOTE_INSN_DELETED_LABEL)) +-/* TODO. Check /s bit also. */ ++ /* TODO. Check /s bit also. */ + { + cet_eb = gen_nop_endbr (); + emit_insn_after (cet_eb, insn); +--- gcc/testsuite/gcc.target/i386/pr84146.c.jj 2018-01-31 16:32:28.099929916 +0100 ++++ gcc/testsuite/gcc.target/i386/pr84146.c 2018-01-31 14:04:17.796122397 +0100 +@@ -0,0 +1,14 @@ ++/* PR target/84146 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -g -mcet -fcf-protection=full" } */ ++ ++int __setjmp (void **); ++void *buf[64]; ++ ++void ++foo (void) ++{ ++ __setjmp (buf); ++ for (;;) ++ ; ++} diff --git a/sources b/sources index 7ca797e..d1d2fef 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (gcc-8.0.1-20180130.tar.xz) = 86e6bf74a009eb0ec9ac1eeddc0961759fce6bc0436826a0b55671bb000724a0ce6ca822c4a9df7c70121d98cbb881cd65f7e2d2dbfbba1b6dc2d02ebffd2516 +SHA512 (gcc-8.0.1-20180131.tar.xz) = c9416d69a0dad197f538b48086107ccbea0118b47ca72e0ef7356628f2bf0075d0cebe73ee97a6d61d48b736829e676337adc2d046500ffa797ffad8b20f36d8 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.xz) = 94f7089365296f7dfa485107b4143bebc850a81586f3460fd896bbbb6ba099a00217d4042133424fd2183b352132f4fd367e6a60599bdae2a26dfd48a77d0e04 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.xz) = a688cb12cf805950a5abbb13b52f45c81dbee98e310b7ed57ae20e76dbfa5964a16270148374a6426d177db71909d28360490f091c86a5d19d4faa5127beeee1