repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20010924-1.c
blob
247f51ce64cb4bacca0c7710f85edaeade2926a6
1
/* Verify that flexible arrays can be initialized from STRING_CST
2
constructors. */
3
4
/* Baselines. */
5
struct
{
6
char
a1c
;
7
char
*
a1p
;
8
}
a1
= {
9
'4'
,
10
"62"
11
};
12
13
struct
{
14
char
a2c
;
15
char
a2p
[
2
];
16
}
a2
= {
17
'v'
,
18
"cq"
19
};
20
21
/* The tests. */
22
struct
{
23
char
a3c
;
24
char
a3p
[];
25
}
a3
= {
26
'o'
,
27
"wx"
28
};
29
30
struct
{
31
char
a4c
;
32
char
a4p
[];
33
}
a4
= {
34
'9'
,
35
{
'e'
,
'b'
}
36
};
37
38
main
()
39
{
40
if
(
a1
.
a1c
!=
'4'
)
41
abort
();
42
if
(
a1
.
a1p
[
0
] !=
'6'
)
43
abort
();
44
if
(
a1
.
a1p
[
1
] !=
'2'
)
45
abort
();
46
if
(
a1
.
a1p
[
2
] !=
'\0'
)
47
abort
();
48
49
if
(
a2
.
a2c
!=
'v'
)
50
abort
();
51
if
(
a2
.
a2p
[
0
] !=
'c'
)
52
abort
();
53
if
(
a2
.
a2p
[
1
] !=
'q'
)
54
abort
();
55
56
if
(
a3
.
a3c
!=
'o'
)
57
abort
();
58
if
(
a3
.
a3p
[
0
] !=
'w'
)
59
abort
();
60
if
(
a3
.
a3p
[
1
] !=
'x'
)
61
abort
();
62
63
if
(
a4
.
a4c
!=
'9'
)
64
abort
();
65
if
(
a4
.
a4p
[
0
] !=
'e'
)
66
abort
();
67
if
(
a4
.
a4p
[
1
] !=
'b'
)
68
abort
();
69
70
return
0
;
71
}