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  <ja...@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

Reply via email to