PR tree-optimization/85826 - ICE in gimple-ssa-warn-restruct on
[official-gcc.git] / gcc / testsuite / gcc.dg / pr60195.c
blob0a50a30be25456ab0c72ac5220708de93d4c96ef
1 /* PR c/60195 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -Wpedantic -Wall" } */
5 typedef _Atomic int atomic_int;
7 atomic_int
8 fn1 (void)
10 atomic_int y = 0;
11 return y;
14 atomic_int
15 fn2 (void)
17 atomic_int y = 0;
19 return y;
22 atomic_int
23 fn3 (void)
25 atomic_int y = 0;
26 y++;
27 return y;
30 void
31 fn4 (void)
33 atomic_int y;
34 y = 0;
35 (void) y;
38 void
39 fn5 (void)
41 atomic_int y = 0; /* { dg-warning "unused variable" } */
44 void
45 fn6 (void)
47 atomic_int y; /* { dg-warning "set but not used" } */
48 y = 0;
51 void
52 fn7 (void)
54 atomic_int y = 0;
55 y++;