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
/
pr79737-1.c
blob
f7fa5f9ea9b7a99054084ed7c38c462f734217d4
1
/* PR tree-optimization/79737 */
2
3
#if __SIZEOF_INT__ < 4
4
__extension__
typedef
__INT32_TYPE__
int32_t
;
5
#else
6
typedef
int int32_t
;
7
#endif
8
9
#pragma pack(1)
10
struct
S
11
{
12
int32_t
b
:
18
;
13
int32_t
c
:
1
;
14
int32_t
d
:
24
;
15
int32_t
e
:
15
;
16
int32_t
f
:
14
;
17
}
i
;
18
int
g
,
j
,
k
;
19
static struct
S h
;
20
21
void
22
foo
()
23
{
24
for
(
j
=
0
;
j
<
6
;
j
++)
25
k
=
0
;
26
for
(;
k
<
3
;
k
++)
27
{
28
struct
S m
= {
5
,
0
, -
5
,
9
,
5
};
29
h
=
m
;
30
if
(
g
)
31
i
=
m
;
32
h
.
e
=
0
;
33
}
34
}
35
36
int
37
main
()
38
{
39
foo
();
40
if
(
h
.
e
!=
0
)
41
__builtin_abort
();
42
return
0
;
43
}