blob: a6894954e714536cbb219594c506971043a3e5d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}
|