repo.or.cz
/
ppcg.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ppcg_kernel: initialize array field as soon as ppcg_kernel is created
[ppcg.git]
/
tests
/
struct3.c
blob
de383b65cdf2ac1ba1c55cd89a474ca8b13b991d
1
#include <stdlib.h>
2
3
struct
s
{
4
int
a
;
5
int
b
;
6
};
7
8
int
main
()
9
{
10
struct
s a
,
b
[
10
];
11
12
a
.
b
=
57
;
13
#pragma scop
14
a
.
a
=
42
;
15
for
(
int
i
=
0
;
i
<
10
; ++
i
)
16
b
[
i
] =
a
;
17
#pragma endscop
18
for
(
int
i
=
0
;
i
<
10
; ++
i
)
19
if
(
b
[
i
].
a
!=
42
)
20
return
EXIT_FAILURE
;
21
if
(
a
.
b
!=
57
)
22
return
EXIT_FAILURE
;
23
24
return
EXIT_SUCCESS
;
25
}