Sign in
gnu
/
gcc
/
9e79a25b66cb7e0ddbd1410ecc86cec25588d172
/
.
/
gcc
/
testsuite
/
gcc.dg
/
Wstrict-aliasing-bogus-const-ptr-nonconst-ptr.c
blob: 8a5dcd8e2a56d8050213b972a4e91302f5140717 [
file
] [
log
] [
blame
]
/* { dg-do compile } */
/* { dg-options "-O2 -Wstrict-aliasing -fstrict-aliasing" } */
const
int
*
foo
(
void
)
{
int
*
i
;
const
int
**
cpi
=
(
const
int
**)
&
i
;
/* { dg-bogus "const vs. non-const" } */
i
=
0
;
return
*
cpi
;
}