1 /* PR c/60195 */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -Wpedantic -Wall" } */
4 
5 typedef _Atomic int atomic_int;
6 
7 atomic_int
fn1(void)8 fn1 (void)
9 {
10   atomic_int y = 0;
11   return y;
12 }
13 
14 atomic_int
fn2(void)15 fn2 (void)
16 {
17   atomic_int y = 0;
18   y;
19   return y;
20 }
21 
22 atomic_int
fn3(void)23 fn3 (void)
24 {
25   atomic_int y = 0;
26   y++;
27   return y;
28 }
29 
30 void
fn4(void)31 fn4 (void)
32 {
33   atomic_int y;
34   y = 0;
35   (void) y;
36 }
37 
38 void
fn5(void)39 fn5 (void)
40 {
41   atomic_int y = 0; /* { dg-warning "unused variable" } */
42 }
43 
44 void
fn6(void)45 fn6 (void)
46 {
47   atomic_int y;  /* { dg-warning "set but not used" } */
48   y = 0;
49 }
50 
51 void
fn7(void)52 fn7 (void)
53 {
54   atomic_int y = 0;
55   y++;
56 }
57