[committed] Add testcase for PR tree-optimization/51575
Jakub Jelinek
jakub@redhat.com
Fri Dec 16 16:40:00 GMT 2011
Hi!
This PR got also fixed by my PR51576 patch, as that one was a bootstrap
issue with non-default language, this one adds a testcase for it into
the testsuite.
Regtested on x86_64-linux, committed to trunk.
2011-12-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51575
* g++.dg/opt/pr51575.C: New test.
--- gcc/testsuite/g++.dg/opt/pr51575.C.jj 2011-12-16 17:31:45.407444733 +0100
+++ gcc/testsuite/g++.dg/opt/pr51575.C 2011-12-16 17:31:38.526484764 +0100
@@ -0,0 +1,21 @@
+// PR tree-optimization/51575
+// { dg-do compile }
+// { dg-options "-O -fnon-call-exceptions" }
+
+#include <new>
+
+struct S
+{
+ S ()
+ {
+ for (int i = 0; i < 3; ++i)
+ new (&a[i]) double ();
+ }
+ double a[4];
+};
+
+void
+foo ()
+{
+ S s;
+}
Jakub
More information about the Gcc-patches
mailing list