Split print_rtx into subroutines
[official-gcc.git] / gcc / testsuite / gcc.dg / pr65345-2.c
blobc9adffb5f5aff9344367fef5237e99e474a84cd3
1 /* PR c/65345 */
2 /* { dg-do run } */
3 /* { dg-require-effective-target sync_int_long } */
4 /* { dg-options "" } */
6 #define CHECK(X) if (!(X)) __builtin_abort ()
8 _Atomic int i = 5;
9 _Atomic int j = 2;
11 void
12 fn1 (int a[i = 0])
16 void
17 fn2 (int a[i += 2])
21 void
22 fn3 (int a[++i])
26 void
27 fn4 (int a[++i])
31 void
32 fn5 (int a[++i][j = 10])
36 void
37 fn6 (int a[i = 7][j--])
41 int
42 main ()
44 int a[10];
45 int aa[10][10];
46 fn1 (a);
47 CHECK (i == 0);
48 fn2 (a);
49 CHECK (i == 2);
50 fn3 (a);
51 CHECK (i == 3);
52 fn4 (a);
53 CHECK (i == 4);
54 fn5 (aa);
55 CHECK (i == 5);
56 CHECK (j == 10);
57 fn6 (aa);
58 CHECK (i == 7);
59 CHECK (j == 9);