summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-never-dereferenced.c
blob: fd3f767ac8618e082481cc1e03d970fd2e6f9a5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */


int foo ()
{
  int x = 10;
  int *p;
  float *q;

  q = (float*) &x;  /* { dg-bogus "not referenced" } */

  return x;
}