diff --git a/.gitignore b/.gitignore index e9b89ae..5e3e0a1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /gcc-5.0.0-20150206.tar.bz2 /gcc-5.0.0-20150208.tar.bz2 /gcc-5.0.0-20150210.tar.bz2 +/gcc-5.0.0-20150212.tar.bz2 diff --git a/gcc.spec b/gcc.spec index 18e5d87..632fc02 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,9 +1,9 @@ -%global DATE 20150210 -%global SVNREV 220591 +%global DATE 20150212 +%global SVNREV 220650 %global gcc_version 5.0.0 # 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.11 +%global gcc_release 0.12 %global _unpackaged_files_terminate_build 0 %global _performance_build 1 %global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64 @@ -198,12 +198,9 @@ Patch11: gcc5-no-add-needed.patch Patch12: gcc5-libgo-p224.patch Patch13: gcc5-aarch64-async-unw-tables.patch Patch14: gcc5-libsanitize-aarch64-va42.patch -Patch15: gcc5-pr61925.patch -Patch16: gcc5-pr64893.patch -Patch17: gcc5-pr64984.patch -Patch18: gcc5-pr65000.patch -Patch19: gcc5-pr65003.patch -Patch20: gcc5-pr65004.patch +Patch15: gcc5-pr64884.patch +Patch16: gcc5-pr65000.patch +Patch17: gcc5-pr65034.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -753,12 +750,9 @@ package or when debugging this package. rm -f libgo/go/crypto/elliptic/p224{,_test}.go %patch13 -p0 -b .aarch64-async-unw-tables~ %patch14 -p0 -b .libsanitize-aarch64-va42~ -%patch15 -p0 -b .pr61925~ -%patch16 -p0 -b .pr64893~ -%patch17 -p0 -b .pr64984~ -%patch18 -p0 -b .pr65000~ -%patch19 -p0 -b .pr65003~ -%patch20 -p0 -b .pr65004~ +%patch15 -p0 -b .pr64884~ +%patch16 -p0 -b .pr65000~ +%patch17 -p0 -b .pr65034~ %if 0%{?_enable_debug_packages} mkdir dwz-wrapper @@ -2944,6 +2938,12 @@ fi %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Thu Feb 12 2015 Jakub Jelinek 5.0.0-0.12 +- update from the trunk + - PRs ipa/64813, ipa/65005, lto/65015, sanitizer/65000, sanitizer/65019, + target/63347, target/64661, testsuite/64930, tree-optimization/65014 +- fix ARM ICF ICE (PR ipa/65034) + * Tue Feb 10 2015 Jakub Jelinek 5.0.0-0.11 - update from the trunk - PRs c++/64899, c++/64994, c/64856, gcov-profile/61889, ipa/63566, diff --git a/gcc5-pr61925.patch b/gcc5-pr61925.patch deleted file mode 100644 index f8e6a20..0000000 --- a/gcc5-pr61925.patch +++ /dev/null @@ -1,220 +0,0 @@ -2015-01-28 Jakub Jelinek - - PR target/61925 - * config/i386/i386.c (ix86_reset_to_default_globals): Removed. - (ix86_reset_previous_fndecl): Restore it here, unconditionally. - (ix86_set_current_function): Rewritten. - (ix86_add_new_builtins): Temporarily clear current_target_pragma - when creating builtin fndecls. - - * gcc.target/i386/pr61925-1.c: New test. - * gcc.target/i386/pr61925-2.c: New test. - * gcc.target/i386/pr61925-3.c: New test. - ---- gcc/config/i386/i386.c.jj 2015-01-26 22:27:20.000000000 +0100 -+++ gcc/config/i386/i386.c 2015-01-28 14:41:03.008727087 +0100 -@@ -5076,35 +5076,20 @@ ix86_can_inline_p (tree caller, tree cal - /* Remember the last target of ix86_set_current_function. */ - static GTY(()) tree ix86_previous_fndecl; - --/* Set target globals to default. */ -+/* Set targets globals to the default (or current #pragma GCC target -+ if active). Invalidate ix86_previous_fndecl cache. */ - --static void --ix86_reset_to_default_globals (void) --{ -- tree old_tree = (ix86_previous_fndecl -- ? DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl) -- : NULL_TREE); -- -- if (old_tree) -- { -- tree new_tree = target_option_current_node; -- cl_target_option_restore (&global_options, -- TREE_TARGET_OPTION (new_tree)); -- if (TREE_TARGET_GLOBALS (new_tree)) -- restore_target_globals (TREE_TARGET_GLOBALS (new_tree)); -- else if (new_tree == target_option_default_node) -- restore_target_globals (&default_target_globals); -- else -- TREE_TARGET_GLOBALS (new_tree) -- = save_target_globals_default_opts (); -- } --} -- --/* Invalidate ix86_previous_fndecl cache. */ - void - ix86_reset_previous_fndecl (void) - { -- ix86_reset_to_default_globals (); -+ tree new_tree = target_option_current_node; -+ cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree)); -+ if (TREE_TARGET_GLOBALS (new_tree)) -+ restore_target_globals (TREE_TARGET_GLOBALS (new_tree)); -+ else if (new_tree == target_option_default_node) -+ restore_target_globals (&default_target_globals); -+ else -+ TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts (); - ix86_previous_fndecl = NULL_TREE; - } - -@@ -5117,34 +5102,39 @@ ix86_set_current_function (tree fndecl) - /* Only change the context if the function changes. This hook is called - several times in the course of compiling a function, and we don't want to - slow things down too much or call target_reinit when it isn't safe. */ -- if (fndecl && fndecl != ix86_previous_fndecl) -- { -- tree old_tree = (ix86_previous_fndecl -- ? DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl) -- : NULL_TREE); -+ if (fndecl == ix86_previous_fndecl) -+ return; - -- tree new_tree = (fndecl -- ? DECL_FUNCTION_SPECIFIC_TARGET (fndecl) -- : NULL_TREE); -+ tree old_tree; -+ if (ix86_previous_fndecl == NULL_TREE) -+ old_tree = target_option_current_node; -+ else if (DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl)) -+ old_tree = DECL_FUNCTION_SPECIFIC_TARGET (ix86_previous_fndecl); -+ else -+ old_tree = target_option_default_node; - -- if (old_tree == new_tree) -- ; -+ if (fndecl == NULL_TREE) -+ { -+ if (old_tree != target_option_current_node) -+ ix86_reset_previous_fndecl (); -+ return; -+ } - -- else if (new_tree && new_tree != target_option_default_node) -- { -- cl_target_option_restore (&global_options, -- TREE_TARGET_OPTION (new_tree)); -- if (TREE_TARGET_GLOBALS (new_tree)) -- restore_target_globals (TREE_TARGET_GLOBALS (new_tree)); -- else -- TREE_TARGET_GLOBALS (new_tree) -- = save_target_globals_default_opts (); -- } -+ tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); -+ if (new_tree == NULL_TREE) -+ new_tree = target_option_default_node; - -- else if (old_tree && old_tree != target_option_default_node) -- ix86_reset_to_default_globals (); -- ix86_previous_fndecl = fndecl; -+ if (old_tree != new_tree) -+ { -+ cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree)); -+ if (TREE_TARGET_GLOBALS (new_tree)) -+ restore_target_globals (TREE_TARGET_GLOBALS (new_tree)); -+ else if (new_tree == target_option_default_node) -+ restore_target_globals (&default_target_globals); -+ else -+ TREE_TARGET_GLOBALS (new_tree) = save_target_globals_default_opts (); - } -+ ix86_previous_fndecl = fndecl; - } - - -@@ -30580,6 +30570,8 @@ static void - ix86_add_new_builtins (HOST_WIDE_INT isa) - { - int i; -+ tree saved_current_target_pragma = current_target_pragma; -+ current_target_pragma = NULL_TREE; - - for (i = 0; i < (int)IX86_BUILTIN_MAX; i++) - { -@@ -30606,6 +30598,8 @@ ix86_add_new_builtins (HOST_WIDE_INT isa - TREE_NOTHROW (decl) = 1; - } - } -+ -+ current_target_pragma = saved_current_target_pragma; - } - - /* Bits for builtin_description.flag. */ ---- gcc/testsuite/gcc.target/i386/pr61925-1.c.jj 2015-01-28 15:10:45.756833647 +0100 -+++ gcc/testsuite/gcc.target/i386/pr61925-1.c 2015-01-28 15:11:49.911722473 +0100 -@@ -0,0 +1,21 @@ -+/* PR target/61925 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -w" } */ -+/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */ -+ -+#pragma GCC push_options -+#pragma GCC target("sse") -+typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); -+typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); -+__m128i -+bar (__m128 __A) -+{ -+} -+ -+#pragma GCC pop_options -+ -+__attribute__ ((vector_size (16))) int -+foo (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b) -+{ -+ return a + b; -+} ---- gcc/testsuite/gcc.target/i386/pr61925-2.c.jj 2015-01-28 15:10:48.651783506 +0100 -+++ gcc/testsuite/gcc.target/i386/pr61925-2.c 2015-01-28 15:11:55.432626851 +0100 -@@ -0,0 +1,21 @@ -+/* PR target/61925 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -w" } */ -+/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */ -+ -+#pragma GCC push_options -+#pragma GCC target("sse") -+typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); -+extern __inline __m128 __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -+foo (void) -+{ -+} -+ -+#pragma GCC target("sse2") -+#pragma GCC pop_options -+ -+__attribute__ ((vector_size (16))) int -+bar (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b) -+{ -+ return a + b; -+} ---- gcc/testsuite/gcc.target/i386/pr61925-3.c.jj 2015-01-28 15:10:51.538733503 +0100 -+++ gcc/testsuite/gcc.target/i386/pr61925-3.c 2015-01-28 15:12:01.316524940 +0100 -@@ -0,0 +1,27 @@ -+/* PR target/61925 */ -+/* { dg-do compile } */ -+/* { dg-options "-O2 -w" } */ -+/* { dg-additional-options "-march=i386 -mno-sse" { target ia32 } } */ -+ -+#pragma GCC push_options -+#pragma GCC target("sse") -+typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); -+ -+void -+foo (void) -+{ -+} -+ -+__attribute__((target ("avx"))) void -+bar (void) -+{ -+} -+ -+#pragma GCC target("sse2") -+#pragma GCC pop_options -+ -+__attribute__ ((vector_size (16))) int -+baz (__attribute__ ((vector_size (16))) int a, __attribute__ ((vector_size (16))) int b) -+{ -+ return a + b; -+} diff --git a/gcc5-pr64884.patch b/gcc5-pr64884.patch new file mode 100644 index 0000000..f9790d8 --- /dev/null +++ b/gcc5-pr64884.patch @@ -0,0 +1,16 @@ +2015-02-12 Jakub Jelinek + + PR c++/64884 + * g++.dg/tm/pr47573.C: Only run on comdat_group effective targets. + +--- gcc/testsuite/g++.dg/tm/pr47573.C.jj 2011-11-08 23:35:11.000000000 +0100 ++++ gcc/testsuite/g++.dg/tm/pr47573.C 2015-02-12 14:26:23.873151135 +0100 +@@ -1,4 +1,7 @@ +-// { dg-do compile } ++// Without comdat support, we don't see the body of the ++// extern template class constructor, so limit this to ++// known comdat targets. ++// { dg-do compile { target comdat_group } } + // { dg-options "-fgnu-tm" } + + template class allocator diff --git a/gcc5-pr64893.patch b/gcc5-pr64893.patch deleted file mode 100644 index af96b6f..0000000 --- a/gcc5-pr64893.patch +++ /dev/null @@ -1,72 +0,0 @@ -2015-02-05 Andrew Pinski - - PR target/64893 - * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins): - Change the first argument type to size_type_node and add another - size_type_node. - (aarch64_simd_expand_builtin): Handle the new argument to - AARCH64_SIMD_BUILTIN_LANE_CHECK and don't ICE but rather - print sorry out when the first two arguments are not integer constants. - * config/aarch64/arm_neon.h (__AARCH64_LANE_CHECK): - Pass the sizeof directly to __builtin_aarch64_im_lane_boundsi. - * testsuite/c-c++-common/torture/aarch64-vect-lane-1.c: New testcase. - ---- gcc/config/aarch64/aarch64-builtins.c -+++ gcc/config/aarch64/aarch64-builtins.c -@@ -712,7 +712,8 @@ aarch64_init_simd_builtins (void) - aarch64_init_simd_builtin_scalar_types (); - - tree lane_check_fpr = build_function_type_list (void_type_node, -- intSI_type_node, -+ size_type_node, -+ size_type_node, - intSI_type_node, - NULL); - aarch64_builtin_decls[AARCH64_SIMD_BUILTIN_LANE_CHECK] = -@@ -1001,13 +1002,18 @@ aarch64_simd_expand_builtin (int fcode, tree exp, rtx target) - { - if (fcode == AARCH64_SIMD_BUILTIN_LANE_CHECK) - { -- tree nlanes = CALL_EXPR_ARG (exp, 0); -- gcc_assert (TREE_CODE (nlanes) == INTEGER_CST); -- rtx lane_idx = expand_normal (CALL_EXPR_ARG (exp, 1)); -- if (CONST_INT_P (lane_idx)) -- aarch64_simd_lane_bounds (lane_idx, 0, TREE_INT_CST_LOW (nlanes), exp); -+ rtx totalsize = expand_normal (CALL_EXPR_ARG (exp, 0)); -+ rtx elementsize = expand_normal (CALL_EXPR_ARG (exp, 1)); -+ if (CONST_INT_P (totalsize) && CONST_INT_P (elementsize) && elementsize != const0_rtx) -+ { -+ rtx lane_idx = expand_normal (CALL_EXPR_ARG (exp, 2)); -+ if (CONST_INT_P (lane_idx)) -+ aarch64_simd_lane_bounds (lane_idx, 0, UINTVAL (totalsize) / UINTVAL (elementsize), exp); -+ else -+ error ("%Klane index must be a constant immediate", exp); -+ } - else -- error ("%Klane index must be a constant immediate", exp); -+ sorry ("%Ktotal size and element size must be a constant immediate", exp); - /* Don't generate any RTL. */ - return const0_rtx; - } ---- gcc/config/aarch64/arm_neon.h -+++ gcc/config/aarch64/arm_neon.h -@@ -541,7 +541,7 @@ typedef struct poly16x8x4_t - - #define __AARCH64_NUM_LANES(__v) (sizeof (__v) / sizeof (__v[0])) - #define __AARCH64_LANE_CHECK(__vec, __idx) \ -- __builtin_aarch64_im_lane_boundsi (__AARCH64_NUM_LANES (__vec), __idx) -+ __builtin_aarch64_im_lane_boundsi (sizeof(__vec), sizeof(__vec[0]), __idx) - - /* For big-endian, GCC's vector indices are the opposite way around - to the architectural lane indices used by Neon intrinsics. */ ---- gcc/testsuite/c-c++-common/torture/aarch64-vect-lane-1.c -+++ gcc/testsuite/c-c++-common/torture/aarch64-vect-lane-1.c -@@ -0,0 +1,8 @@ -+// { dg-do compile { target "aarch64*-*-*" } } -+#include -+int -+search_line_fast (uint32x2_t t) -+{ -+ return vget_lane_u32 (t, 0); -+} -+ diff --git a/gcc5-pr64984.patch b/gcc5-pr64984.patch deleted file mode 100644 index c37c0d4..0000000 --- a/gcc5-pr64984.patch +++ /dev/null @@ -1,98 +0,0 @@ -2015-02-10 Jakub Jelinek - - PR sanitizer/64984 - * except.c (check_noexcept_r): Return NULL for internal - calls. - - * g++.dg/ubsan/pr64984.C: New test. - ---- gcc/cp/except.c.jj 2015-01-31 10:07:36.000000000 +0100 -+++ gcc/cp/except.c 2015-02-10 09:06:44.712226554 +0100 -@@ -1148,7 +1148,7 @@ check_noexcept_r (tree *tp, int * /*walk - { - tree t = *tp; - enum tree_code code = TREE_CODE (t); -- if (code == CALL_EXPR -+ if ((code == CALL_EXPR && CALL_EXPR_FN (t)) - || code == AGGR_INIT_EXPR) - { - /* We can only use the exception specification of the called function ---- gcc/testsuite/g++.dg/ubsan/pr64984.C.jj 2015-02-10 09:52:43.720720833 +0100 -+++ gcc/testsuite/g++.dg/ubsan/pr64984.C 2015-02-10 10:00:00.343370913 +0100 -@@ -0,0 +1,76 @@ -+// PR sanitizer/64984 -+// { dg-do compile } -+// { dg-options "-fsanitize=vptr -std=gnu++11" } -+ -+template struct K -+{ -+ static constexpr X v = 0; -+ typedef K t; -+}; -+template struct A; -+template -+struct A : Y -+{ -+}; -+template X M (); -+template struct B; -+template -+struct B : K(M()))> -+{ -+}; -+template -+struct G : A>::t -+{ -+}; -+template struct J : G -+{ -+}; -+template X&& foo (X&); -+template X&& bar (X&&); -+template struct P -+{ -+ P (X& x) : q (x) {} -+ X q; -+}; -+template struct Q; -+template -+struct Q : P -+{ -+ typedef P r; -+ X& s (Q&); -+ Q (X& x) : r (x) {} -+ Q (Q&& x) noexcept (J::v) : r (foo(s (x))) -+ { -+ } -+}; -+template struct I : Q -+{ -+ I (); -+ I (X&... x) : Q(x...) -+ { -+ } -+}; -+template -+I baz (X&&... x) -+{ -+ return I (foo(x)...); -+} -+template struct F -+{ -+ int p; -+ void operator[] (X&& x) -+ { -+ baz (bar (x)); -+ } -+}; -+struct U -+{ -+ virtual ~U (); -+}; -+ -+int -+main () -+{ -+ F m; -+ m[U ()]; -+} diff --git a/gcc5-pr65000.patch b/gcc5-pr65000.patch index 691198d..7d386f1 100644 --- a/gcc5-pr65000.patch +++ b/gcc5-pr65000.patch @@ -1,26 +1,22 @@ -2015-02-10 Richard Henderson +2015-02-12 Jakub Jelinek PR sanitizer/65000 - * tree-eh.c (mark_reachable_handlers): Mark regions mentioned in - __builtin_eh_copy_values as reachable. + * g++.dg/ubsan/pr65000.C: New test. ---- gcc/tree-eh.c -+++ gcc/tree-eh.c -@@ -3859,6 +3859,17 @@ mark_reachable_handlers (sbitmap *r_reachablep, sbitmap *lp_reachablep) - gimple_eh_dispatch_region ( - as_a (stmt))); - break; -+ case GIMPLE_CALL: -+ if (gimple_call_builtin_p (stmt, BUILT_IN_EH_COPY_VALUES)) -+ for (int i = 0; i < 2; ++i) -+ { -+ tree rt = gimple_call_arg (stmt, i); -+ HOST_WIDE_INT ri = tree_to_shwi (rt); +--- gcc/testsuite/g++.dg/ubsan/pr65000.C.jj 2015-02-12 14:23:00.908487082 +0100 ++++ gcc/testsuite/g++.dg/ubsan/pr65000.C 2015-02-12 14:21:35.000000000 +0100 +@@ -0,0 +1,14 @@ ++// PR sanitizer/65000 ++// { dg-do compile } ++// { dg-options "-O1 -fsanitize=undefined -fno-sanitize-recover" } + -+ gcc_assert (ri = (int)ri); -+ bitmap_set_bit (r_reachable, ri); -+ } -+ break; - default: - break; - } ++struct B { virtual ~B () {} void foo (); }; ++struct C { virtual ~C (); }; ++struct A : public virtual C {}; ++struct D : A { ~D () { d.foo (); } B d; }; ++ ++void ++bar () ++{ ++ D a; ++} diff --git a/gcc5-pr65003.patch b/gcc5-pr65003.patch deleted file mode 100644 index b81398d..0000000 --- a/gcc5-pr65003.patch +++ /dev/null @@ -1,57 +0,0 @@ -2015-02-10 Jakub Jelinek - - PR middle-end/65003 - * varasm.c (place_block_symbol): Assert that DECL_RTL of the - ultimate alias is MEM with SYMBOL_REF satisfying - SYMBOL_REF_HAS_BLOCK_INFO_P as its operand. Don't pass the MEM - to place_block_symbol, but instead pass the SYMBOL_REF operand of it. - - * g++.dg/opt/pr65003.C: New test. - ---- gcc/varasm.c.jj 2015-02-04 15:24:20.000000000 +0100 -+++ gcc/varasm.c 2015-02-10 15:37:55.872609142 +0100 -@@ -7180,6 +7180,10 @@ place_block_symbol (rtx symbol) - { - rtx target = DECL_RTL (snode->ultimate_alias_target ()->decl); - -+ gcc_assert (MEM_P (target) -+ && GET_CODE (XEXP (target, 0)) == SYMBOL_REF -+ && SYMBOL_REF_HAS_BLOCK_INFO_P (XEXP (target, 0))); -+ target = XEXP (target, 0); - place_block_symbol (target); - SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target); - return; ---- gcc/testsuite/g++.dg/opt/pr65003.C.jj 2015-02-10 15:50:44.240734029 +0100 -+++ gcc/testsuite/g++.dg/opt/pr65003.C 2015-02-10 15:50:39.468814055 +0100 -@@ -0,0 +1,31 @@ -+// PR middle-end/65003 -+// { dg-do compile } -+// { dg-options "-O2" } -+// { dg-additional-options "-fpic" { target fpic } } -+ -+struct A -+{ -+ void operator= (A &); -+ A (); -+}; -+struct B -+{ -+ A b; -+}; -+struct C -+{ -+ virtual bool foo (int &, bool) const; -+}; -+struct D : virtual C -+{ -+ bool foo (int &, bool) const; -+ B e; -+}; -+struct F : D -+{ -+ F (int &, const int &, const A &); -+ bool foo (int &, bool) const; -+}; -+bool D::foo (int &, bool) const {} -+F::F (int &, const int &, const A &) {} -+bool F::foo (int &, bool) const {} diff --git a/gcc5-pr65004.patch b/gcc5-pr65004.patch deleted file mode 100644 index 5e56546..0000000 --- a/gcc5-pr65004.patch +++ /dev/null @@ -1,69 +0,0 @@ -2015-02-10 Jakub Jelinek - - PR sanitizer/65004 - * ubsan.c (ubsan_expand_vptr_ifn): Always return true. - - * g++.dg/asan/pr65004.C: New test. - ---- gcc/ubsan.c.jj 2015-01-28 08:39:53.000000000 +0100 -+++ gcc/ubsan.c 2015-02-10 18:44:59.796872508 +0100 -@@ -1148,7 +1148,7 @@ ubsan_expand_vptr_ifn (gimple_stmt_itera - /* Get rid of the UBSAN_VPTR call from the IR. */ - unlink_stmt_vdef (stmt); - gsi_remove (&gsi, true); -- return gsi_end_p (*gsip); -+ return true; - } - - /* Instrument a memory reference. BASE is the base of MEM, IS_LHS says ---- gcc/testsuite/g++.dg/asan/pr65004.C.jj 2015-02-10 18:49:48.521988574 +0100 -+++ gcc/testsuite/g++.dg/asan/pr65004.C 2015-02-10 18:51:22.249407985 +0100 -@@ -0,0 +1,48 @@ -+// PR sanitizer/65004 -+// { dg-do compile } -+// { dg-options "-fcompare-debug -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all" } -+ -+namespace N { -+ template struct function; -+ namespace detail { -+ namespace function { -+ struct vtable_base { }; -+ } -+ } -+ struct function_base { -+ detail::function::vtable_base * vtable; -+ }; -+ template struct function1 : public function_base { }; -+ template struct function : public function1 { }; -+} -+namespace Bar { -+ typedef N::function WarningHandler; -+} -+namespace Foo { -+ struct FooRecord { -+ virtual ~FooRecord (); -+ }; -+ struct TestRecord : public FooRecord { -+ long x; -+ }; -+} -+namespace Foo { -+ using Bar::WarningHandler; -+ struct FooScanner { -+ WarningHandler warnHandler; -+ int readByte (); -+ long readSignedInteger (); -+ }; -+ struct FooRecordReader { -+ FooScanner & scanner; -+ long readSInt (); -+ void readTestRecord (TestRecord * recp); -+ }; -+ inline long FooRecordReader::readSInt () { -+ return scanner.readSignedInteger (); -+ } -+ void FooRecordReader::readTestRecord (TestRecord * recp) { -+ int infoByte = scanner.readByte (); -+ recp->x = readSInt (); -+ } -+ diff --git a/gcc5-pr65034.patch b/gcc5-pr65034.patch new file mode 100644 index 0000000..4b126c7 --- /dev/null +++ b/gcc5-pr65034.patch @@ -0,0 +1,85 @@ +2015-02-12 Jakub Jelinek + + PR ipa/65034 + * stmt.c (emit_case_nodes): Use void_type_node instead of + NULL_TREE as LABEL_DECL type. + + * decl.c (start_preparsed_function): Use void_type_node instead + of NULL_TREE as LABEL_DECL type. + + * g++.dg/ipa/pr65034.C: New test. + +--- gcc/stmt.c.jj 2015-01-15 23:39:17.000000000 +0100 ++++ gcc/stmt.c 2015-02-12 10:11:44.688737296 +0100 +@@ -1722,7 +1722,7 @@ emit_case_nodes (rtx index, case_node_pt + + tree test_label + = build_decl (curr_insn_location (), +- LABEL_DECL, NULL_TREE, NULL_TREE); ++ LABEL_DECL, NULL_TREE, void_type_node); + + /* The default label could be reached either through the right + subtree or the left subtree. Divide the probability +@@ -1881,7 +1881,7 @@ emit_case_nodes (rtx index, case_node_pt + Branch to a label where we will handle it later. */ + + test_label = build_decl (curr_insn_location (), +- LABEL_DECL, NULL_TREE, NULL_TREE); ++ LABEL_DECL, NULL_TREE, void_type_node); + probability = conditional_probability ( + node->right->subtree_prob + default_prob/2, + subtree_prob + default_prob); +--- gcc/cp/decl.c.jj 2015-02-06 12:34:08.000000000 +0100 ++++ gcc/cp/decl.c 2015-02-12 10:10:03.694397766 +0100 +@@ -13703,7 +13703,7 @@ start_preparsed_function (tree decl1, tr + && targetm.cxx.cdtor_returns_this ())) + { + cdtor_label = build_decl (input_location, +- LABEL_DECL, NULL_TREE, NULL_TREE); ++ LABEL_DECL, NULL_TREE, void_type_node); + DECL_CONTEXT (cdtor_label) = current_function_decl; + } + +--- gcc/testsuite/g++.dg/ipa/pr65034.C.jj 2015-02-12 10:26:17.814382354 +0100 ++++ gcc/testsuite/g++.dg/ipa/pr65034.C 2015-02-12 10:25:25.000000000 +0100 +@@ -0,0 +1,40 @@ ++// PR ipa/65034 ++// { dg-do compile } ++// { dg-options "-g -O2" } ++ ++enum B { C }; ++enum D { E }; ++struct A { A (B, D) { } }; ++struct F { unsigned g, h, i, j; } a; ++ ++void ++foo (unsigned x, unsigned y) ++{ ++ switch (x) ++ { ++ case 6: ++ a.i = y; ++ break; ++ case 7: ++ a.j = y; ++ break; ++ default: ++ A (C, E); ++ } ++} ++ ++void ++bar (unsigned x, unsigned y) ++{ ++ switch (x) ++ { ++ case 6: ++ a.i = y; ++ break; ++ case 7: ++ a.j = y; ++ break; ++ default: ++ A (C, E); ++ } ++} diff --git a/sources b/sources index a46e1f3..5834ca6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6bf42761df510dd8e26b19118d6a8bb7 gcc-5.0.0-20150210.tar.bz2 +f2b77e649b2b6736a4b0e48bbafc30df gcc-5.0.0-20150212.tar.bz2