re PR c++/68760 (ICE in pp_string (pretty-print.c:909))
authorJakub Jelinek <jakub@redhat.com>
Mon, 7 Dec 2015 22:44:19 +0000 (23:44 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Dec 2015 22:44:19 +0000 (23:44 +0100)
PR c++/68760
* error.c (dump_global_iord): Use DECL_SOURCE_FILE (t)
instead of LOCATION_FILE (input_location).

* g++.dg/tree-ssa/pr68760.C: New test.

From-SVN: r231386

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/tree-ssa/pr68760.C [new file with mode: 0644]

index 6b007e2aea3700e3c183a791dc9d1e7e8cabb992..7569a625a7c315978df63ec253bc36c96657712f 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-07  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/68760
+       * error.c (dump_global_iord): Use DECL_SOURCE_FILE (t)
+       instead of LOCATION_FILE (input_location).
+
 2015-12-07  Ryan Burn  <contact@rnburn.com>
 
        PR c++/68683
index 38548c72fe06feda5a21a0546ed309bf448f1d91..e0ba806b32d571fc216198c97bc4aaf95ceedfb1 100644 (file)
@@ -953,7 +953,7 @@ dump_global_iord (cxx_pretty_printer *pp, tree t)
   else
     gcc_unreachable ();
 
-  pp_printf (pp, p, LOCATION_FILE (input_location));
+  pp_printf (pp, p, DECL_SOURCE_FILE (t));
 }
 
 static void
index 48cc7aebfaed082674f713ebca456042562d67b0..000165ce0f982faaeedd27c6c9f4777178944908 100644 (file)
@@ -1,5 +1,8 @@
 2015-12-07  Jakub Jelinek  <jakub@redhat.com>
 
+       PR c++/68760
+       * g++.dg/tree-ssa/pr68760.C: New test.
+
        PR middle-end/66726
        * g++.dg/tree-ssa/pr66726.c: Renamed to...
        * g++.dg/tree-ssa/pr66726.C: ... this.
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr68760.C b/gcc/testsuite/g++.dg/tree-ssa/pr68760.C
new file mode 100644 (file)
index 0000000..a22b88e
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/68760
+// { dg-do compile }
+// { dg-options "-fdump-ipa-cgraph" }
+
+struct A { A (); } a;