pr51879-12.c: New test.

2012-04-14  Tom de Vries  <tom@codesourcery.com>

	* gcc.dg/pr51879-12.c: New test.

From-SVN: r186448
This commit is contained in:
Tom de Vries 2012-04-14 05:49:24 +00:00 committed by Tom de Vries
parent b2b2f160ae
commit 30d1ab7583
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2012-04-14 Tom de Vries <tom@codesourcery.com>
* gcc.dg/pr51879-12.c: New test.
2012-04-13 Jason Merrill <jason@redhat.com>
PR c++/52824

View File

@ -0,0 +1,29 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre" } */
__attribute__((pure)) int bar (int);
__attribute__((pure)) int bar2 (int);
void baz (int);
int x, z;
void
foo (int y)
{
int a = 0;
if (y == 6)
{
a += bar (7);
a += bar2 (6);
}
else
{
a += bar2 (6);
a += bar (7);
}
baz (a);
}
/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */