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
Handle peeling for alignment with masking
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
Warray-bounds-26.c
blob
85bdb3ea14647e151d3923284506779189ab9c8c
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Warray-bounds" } */
3
4
struct
Rec
{
5
unsigned char
data
[
1
];
// actually variable length
6
};
7
8
union
U
{
9
unsigned char
buf
[
42
];
10
struct
Rec rec
;
11
};
12
13
int
Load
()
14
{
15
union
U u
;
16
return
u
.
rec
.
data
[
1
];
/* { dg-bogus "array bound" } */
17
}