]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-pta-1.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / Wstrict-aliasing-bogus-pta-1.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
3
4 struct S { int *p; int *q; };
5
6 void foo (struct S *);
7
8 int bar (int b)
9 {
10 struct S s;
11 int *p;
12 float f;
13 foo (&s);
14 if (b)
15 p = s.q;
16 else
17 p = (int *)&f;
18 return *p;
19 }