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
* gcc.target/i386/mpx/hard-reg-1-nov.c (mpx_test): Use "esp"
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr41395-2.c
blob
c75e963613bb86b84d570851dff0894d2cbede49
1
struct
VEC_char_base
2
{
3
unsigned
num
;
4
unsigned
alloc
;
5
union
{
6
short
vec
[
1
];
7
struct
{
8
int
i
;
9
int
j
;
10
int
k
;
11
}
a
;
12
}
u
;
13
};
14
15
short
__attribute__
((
noinline
))
16
foo
(
struct
VEC_char_base
*
p
,
int
i
)
17
{
18
short
*
q
;
19
p
->
u
.
vec
[
i
] =
0
;
20
q
= &
p
->
u
.
vec
[
16
];
21
*
q
=
1
;
22
return
p
->
u
.
vec
[
i
];
23
}
24
25
extern
void
abort
(
void
);
26
extern
void
*
malloc
(
__SIZE_TYPE__
);
27
28
int
29
main
()
30
{
31
struct
VEC_char_base
*
p
=
malloc
(
sizeof
(
struct
VEC_char_base
) +
256
);
32
if
(
foo
(
p
,
16
) !=
1
)
33
abort
();
34
return
0
;
35
}