diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-01-07 09:47:44 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-01-07 09:47:44 +0100 |
commit | fec64afc1aa77fe557679041a396f2c03fd8d4be (patch) | |
tree | 6fbab6853311d4b8ca916ad2fe8f19121653bf1d | |
parent | 8fc708b795bd3910524f1e62e1d0066cae7d9c5e (diff) | |
download | gcc-fec64afc1aa77fe557679041a396f2c03fd8d4be.zip gcc-fec64afc1aa77fe557679041a396f2c03fd8d4be.tar.gz gcc-fec64afc1aa77fe557679041a396f2c03fd8d4be.tar.bz2 |
re PR tree-optimization/69141 (-O2 -fdump-tree-fre ICEs)
PR tree-optimization/69141
* tree-ssa-pre.c: Include langhooks.h.
(eliminate_dom_walker::before_dom_children): Use
lang_hooks.decl_printable_name instead of
cgraph_node::get ()->name ().
* g++.dg/opt/pr69141.C: New test.
From-SVN: r232123
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/opt/pr69141.C | 15 | ||||
-rw-r--r-- | gcc/tree-ssa-pre.c | 3 |
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b690c97..8cd70fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2016-01-07 Jakub Jelinek <jakub@redhat.com> + PR tree-optimization/69141 + * tree-ssa-pre.c: Include langhooks.h. + (eliminate_dom_walker::before_dom_children): Use + lang_hooks.decl_printable_name instead of + cgraph_node::get ()->name (). + PR middle-end/68960 * gimple-expr.c (copy_var_decl): If var has DECL_USER_ALIGN set, copy it and DECL_ALIGN too. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 538268e..e21b718 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-01-07 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/69141 + * g++.dg/opt/pr69141.C: New test. + 2016-01-06 Eric Botcazou <ebotcazou@adacore.com> * gcc.target/sparc/20151219-1.c: Skip in 64-bit mode. diff --git a/gcc/testsuite/g++.dg/opt/pr69141.C b/gcc/testsuite/g++.dg/opt/pr69141.C new file mode 100644 index 0000000..34b211c --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr69141.C @@ -0,0 +1,15 @@ +// PR tree-optimization/69141 +// { dg-do compile } +// { dg-options "-O2 -fdump-tree-fre" } + +struct B +{ + B *b; + B (); + virtual void f () = 0; +}; + +B::B () : b (this) +{ + b->f (); +} diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index eeaecdd..1f1b055 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-propagate.h" #include "ipa-utils.h" #include "tree-cfgcleanup.h" +#include "langhooks.h" /* TODO: @@ -4328,7 +4329,7 @@ eliminate_dom_walker::before_dom_children (basic_block b) dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, "converting indirect call to " "function %s\n", - cgraph_node::get (fn)->name ()); + lang_hooks.decl_printable_name (fn, 2)); } gimple_call_set_fndecl (call_stmt, fn); maybe_remove_unused_call_args (cfun, call_stmt); |