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