re PR tree-optimization/51575 (ICE: verify_gimple failed: statement marked for throw, but doesn't with -fnon-call-exceptions and placement new)

PR tree-optimization/51575
	* g++.dg/opt/pr51575.C: New test.

From-SVN: r182409
This commit is contained in:
Jakub Jelinek 2011-12-16 17:36:49 +01:00 committed by Jakub Jelinek
parent d3702b4f3f
commit 134f529521
2 changed files with 24 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2011-12-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51575
* g++.dg/opt/pr51575.C: New test.
PR debug/51557
* gcc.dg/pr51557.c: New test.

View file

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