repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Wstrict-aliasing-bogus-upcast.c
blob
cb70838809a7e1b9f11679537dda858cfee2c848
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wall" } */
3
4
struct
a
{
5
int
i
;
6
};
7
struct
b
{
8
struct
a a
;
9
int
j
;
10
};
11
int
main
(
void
)
12
{
13
static struct
b b
;
14
struct
a
*
ap
=(
struct
a
*)&
b
;
15
return
((
struct
b
*)&
ap
->
i
)->
j
;
/* { dg-bogus "will break strict-aliasing" } */
16
}
17