summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-07 11:49:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-07 11:49:43 +0000
commit7d7f7fb7700f62ae33d9a74acac060818842e6b8 (patch)
tree808dfd682ec577908a9e59e7fc7aa72b36dca9e2 /gcc
parentfe551ce4b1ca15430d74f308aa81f059d0f33d31 (diff)
downloadgcc-7d7f7fb7700f62ae33d9a74acac060818842e6b8.tar.gz
re PR lto/42987 (Testcases local1-a.cc and local1.C cause ICE when compiled with -flto -g)
2012-05-07 Richard Guenther <rguenther@suse.de> PR lto/42987 * g++.dg/lto/pr42987_0.C: New testcase. * g++.dg/lto/pr42987_1.C: Likewise. From-SVN: r187231
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/lto/pr42987_0.C22
-rw-r--r--gcc/testsuite/g++.dg/lto/pr42987_1.C14
3 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4b30e8b3cf3..76a804370f5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-07 Richard Guenther <rguenther@suse.de>
+
+ PR lto/42987
+ * g++.dg/lto/pr42987_0.C: New testcase.
+ * g++.dg/lto/pr42987_1.C: Likewise.
+
2012-05-07 Tobias Burnus <burnus@net-b.de>
PR fortran/53255
diff --git a/gcc/testsuite/g++.dg/lto/pr42987_0.C b/gcc/testsuite/g++.dg/lto/pr42987_0.C
new file mode 100644
index 00000000000..e422daa69e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr42987_0.C
@@ -0,0 +1,22 @@
+// { dg-lto-do run }
+// { dg-lto-options { { -flto -g } { -flto -flto-partition=none -g } } }
+
+#include <typeinfo>
+
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+extern B* g();
+
+int main () {
+ if (typeid (*f()) == typeid (*g()))
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr42987_1.C b/gcc/testsuite/g++.dg/lto/pr42987_1.C
new file mode 100644
index 00000000000..638479e7459
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr42987_1.C
@@ -0,0 +1,14 @@
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+B* g() {
+ return f();
+}