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:
parent
b2b2f160ae
commit
30d1ab7583
@ -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
|
||||
|
29
gcc/testsuite/gcc.dg/pr51879-12.c
Normal file
29
gcc/testsuite/gcc.dg/pr51879-12.c
Normal 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" } } */
|
Loading…
Reference in New Issue
Block a user