]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/modref-2.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / modref-2.c
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
3 short aa;
4 void
5 __attribute__ ((noinline, noclone))
6 recursive (int *a, int *b, int *c, int level)
7 {
8 if (level && c)
9 {
10 recursive (b,a,c,0);
11 aa++;
12 }
13 else
14 *a=0;
15 }
16 int
17 main()
18 {
19 int x = 123, y=124, z=125;
20 recursive (&x,&y,&z,1);
21 if (y)
22 __builtin_abort ();
23 if (!__builtin_constant_p (z))
24 __builtin_abort ();
25 return 0;
26 }