]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/69141 (-O2 -fdump-tree-fre ICEs)
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Jan 2016 08:47:44 +0000 (09:47 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Jan 2016 08:47:44 +0000 (09:47 +0100)
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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr69141.C [new file with mode: 0644]
gcc/tree-ssa-pre.c

index b690c97fc25dd2676037c6a5c3250368def1a015..8cd70fc698714b113136946d68b7becb34c467b7 100644 (file)
@@ -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.
index 538268e973c75b5e137e2f79c1731a1613741c5f..e21b7188c4fdadf8d6292e2292a5440c709731ea 100644 (file)
@@ -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 (file)
index 0000000..34b211c
--- /dev/null
@@ -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 ();
+}
index eeaecdd46d07d12305a82303cbb99fb983c66ff7..1f1b0559d08bb23a43147baad7b50639c322596f 100644 (file)
@@ -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);