Commit e0bb3f18 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/51117 (rev.181172 causes glibc build failure)

	PR tree-optimization/51117
	* g++.dg/opt/pr51117.C: New test.

From-SVN: r182379
parent f3fc9b80
2011-12-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51117
* g++.dg/opt/pr51117.C: New test.
2011-12-15 Romain Geissler <romain.geissler@gmail.com>
* gcc.c-torture/execute/builtins/chk.h (stpncpy, stpncpy_disallowed):
......
// PR tree-optimization/51117
// { dg-do compile }
// { dg-options "-O2 -fexceptions" }
struct A { char buf[64]; };
void bar (A *);
int
foo ()
{
A c;
bar (&c);
try
{
{
A a;
bar (&a);
if (a.buf[13])
throw 1;
else if (a.buf[52])
throw 3;
}
{
A b;
bar (&b);
if (b.buf[13])
throw 2;
}
}
catch ( ...)
{
return 1;
}
return 0;
}
// { dg-final { scan-assembler-not "__cxa_rethrow" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment