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
PR tree-optimization/81384 - built-in form of strnlen missing
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20131127-1.c
blob
8ec49657741cc710a550211f456f9620649a9592
1
/* PR middle-end/59138 */
2
/* Testcase by John Regehr <regehr@cs.utah.edu> */
3
4
extern
void
abort
(
void
);
5
6
#pragma pack(1)
7
8
struct
S0
{
9
int
f0
;
10
int
f1
;
11
int
f2
;
12
short
f3
;
13
};
14
15
short
a
=
1
;
16
17
struct
S0 b
= {
1
},
c
,
d
,
e
;
18
19
struct
S0
fn1
() {
return
c
; }
20
21
void
fn2
(
void
)
22
{
23
b
=
fn1
();
24
a
=
0
;
25
d
=
e
;
26
}
27
28
int
main
(
void
)
29
{
30
fn2
();
31
if
(
a
!=
0
)
32
abort
();
33
return
0
;
34
}