]> gcc.gnu.org Git - gcc.git/commitdiff
re PR lto/42987 (Testcases local1-a.cc and local1.C cause ICE when compiled with...
authorRichard Guenther <rguenther@suse.de>
Mon, 7 May 2012 11:49:43 +0000 (11:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 7 May 2012 11:49:43 +0000 (11:49 +0000)
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

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr42987_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr42987_1.C [new file with mode: 0644]

index 4b30e8b3cf3d21d1769676e45842b0eb39c73037..76a804370f5c4694bb16be58a1fa0e4c6817db7d 100644 (file)
@@ -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 (file)
index 0000000..e422daa
--- /dev/null
@@ -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 (file)
index 0000000..638479e
--- /dev/null
@@ -0,0 +1,14 @@
+struct B {
+  virtual void b() {}
+};
+
+static B* f() {
+  struct D : public B {
+  };
+
+  return new D;
+}
+
+B* g() {
+  return f();
+}
This page took 0.072207 seconds and 5 git commands to generate.