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
libgomp.texi: Update and cleanup of Impl. Status of OpenMP TR13
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
pr41395-1.c
blob
e4df0e5d187319956f407fe103ff232e035fe1ee
1
struct
VEC_char_base
2
{
3
unsigned
num
;
4
unsigned
alloc
;
5
short
vec
[
1
];
6
};
7
8
short
__attribute__
((
noinline
))
9
foo
(
struct
VEC_char_base
*
p
,
int
i
)
10
{
11
short
*
q
;
12
p
->
vec
[
i
] =
0
;
13
q
= &
p
->
vec
[
8
];
14
*
q
=
1
;
15
return
p
->
vec
[
i
];
16
}
17
18
extern
void
abort
(
void
);
19
extern
void
*
malloc
(
__SIZE_TYPE__
);
20
21
int
22
main
()
23
{
24
struct
VEC_char_base
*
p
=
malloc
(
sizeof
(
struct
VEC_char_base
) +
256
);
25
if
(
foo
(
p
,
8
) !=
1
)
26
abort
();
27
return
0
;
28
}