backport: pr52734.c: New test.
2012-04-13 Tom de Vries <tom@codesourcery.com> Backport from mainline r186419. 2012-04-13 Tom de Vries <tom@codesourcery.com> * gcc.dg/pr52734.c: New test. From-SVN: r186425
This commit is contained in:
parent
bdddd97382
commit
4e7776b3a0
|
@ -1,3 +1,11 @@
|
|||
2012-04-13 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
Backport from mainline r186419.
|
||||
|
||||
2012-04-13 Tom de Vries <tom@codesourcery.com>
|
||||
|
||||
* gcc.dg/pr52734.c: New test.
|
||||
|
||||
2012-04-13 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/52969
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O2" } */
|
||||
|
||||
int bbb = 0;
|
||||
|
||||
int __attribute__((noinline,noclone)) aaa(void)
|
||||
{
|
||||
++bbb;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __attribute__((noinline,noclone)) ccc(void)
|
||||
{
|
||||
int ddd;
|
||||
/* bbb == 0 */
|
||||
if (aaa())
|
||||
return bbb;
|
||||
|
||||
/* bbb == 1 */
|
||||
ddd = bbb;
|
||||
/* bbb == ddd == 1 */
|
||||
if (aaa ())
|
||||
return 0;
|
||||
/* bbb == 2, ddd == 1 */
|
||||
|
||||
return ddd;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (ccc() != 1)
|
||||
__builtin_abort();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue