From: Martin Jambor Date: Fri, 25 Nov 2016 09:49:19 +0000 (+0100) Subject: [PR 70965] Schedule extra rebuild_cgraph_edges X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54e606f0b1c03b03538a467d4af3e43b201c05d7;p=gcc.git [PR 70965] Schedule extra rebuild_cgraph_edges 2016-11-25 Martin Jambor PR tree-optimization/70965 * passes.def (pass_build_ssa_passes): Add pass_rebuild_cgraph_edges. gcc/testsuite/ * g++.dg/pr70965.C: New test. From-SVN: r242867 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0878c30be5f..1b18a47d856 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-11-25 Martin Jambor + + PR tree-optimization/70965 + * passes.def (pass_build_ssa_passes): Add pass_rebuild_cgraph_edges. + 2016-11-24 James Greenahlgh PR target/78509 diff --git a/gcc/passes.def b/gcc/passes.def index 2a470a7de07..b73000923b6 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -56,6 +56,7 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_build_ssa_passes); PUSH_INSERT_PASSES_WITHIN (pass_build_ssa_passes) NEXT_PASS (pass_fixup_cfg); + NEXT_PASS (pass_rebuild_cgraph_edges); NEXT_PASS (pass_build_ssa); NEXT_PASS (pass_warn_nonnull_compare); NEXT_PASS (pass_ubsan); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e710e4b7c1d..a345e9c22d7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-11-25 Martin Jambor + + PR tree-optimization/70965 + * g++.dg/pr70965.C: New test. + 2016-11-25 Jakub Jelinek Andreas Schwab diff --git a/gcc/testsuite/g++.dg/pr70965.C b/gcc/testsuite/g++.dg/pr70965.C new file mode 100644 index 00000000000..d8a2c35e532 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr70965.C @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -std=c++11" } */ + +struct A {}; +struct B {}; +struct C { using p = int *; template using ra = A; }; +struct J : C { template struct K { typedef C::ra o; }; }; +template struct D +{ + struct H : J::K::o { H (J::p, A) : J::K::o () {} }; + H d; + D (const char *, const A &x = A ()) : d (0, x) {} +}; +extern template class D; +enum L { M }; +struct F { virtual char *foo (); }; +template struct I : B { static int foo (int) {} }; +struct G { typedef I t; }; +void foo (int) { G::t::foo (0); } +void bar (const D &, const D &, int, L); +void baz () try { foo (0); } catch (F &e) { bar (e.foo (), "", 0, M); }