diff mbox

[committed] Add testcase for PR tree-optimization/51575

Message ID 20111216163851.GZ1957@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek Dec. 16, 2011, 4:38 p.m. UTC
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.


	Jakub
diff mbox

Patch

--- 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;
+}