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
Fix Ada runtime library breakage on Solaris
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
20010924-1.c
blob
56206b01fa6a39059656326b91cad497f7314b0c
1
/* Verify that flexible arrays can be initialized from STRING_CST
2
constructors. */
3
4
void
abort
(
void
);
5
6
/* Baselines. */
7
struct
{
8
char
a1c
;
9
char
*
a1p
;
10
}
a1
= {
11
'4'
,
12
"62"
13
};
14
15
struct
{
16
char
a2c
;
17
char
a2p
[
2
];
18
}
a2
= {
19
'v'
,
20
"cq"
21
};
22
23
/* The tests. */
24
struct
{
25
char
a3c
;
26
char
a3p
[];
27
}
a3
= {
28
'o'
,
29
"wx"
30
};
31
32
struct
{
33
char
a4c
;
34
char
a4p
[];
35
}
a4
= {
36
'9'
,
37
{
'e'
,
'b'
}
38
};
39
40
int
41
main
(
void
)
42
{
43
if
(
a1
.
a1c
!=
'4'
)
44
abort
();
45
if
(
a1
.
a1p
[
0
] !=
'6'
)
46
abort
();
47
if
(
a1
.
a1p
[
1
] !=
'2'
)
48
abort
();
49
if
(
a1
.
a1p
[
2
] !=
'\0'
)
50
abort
();
51
52
if
(
a2
.
a2c
!=
'v'
)
53
abort
();
54
if
(
a2
.
a2p
[
0
] !=
'c'
)
55
abort
();
56
if
(
a2
.
a2p
[
1
] !=
'q'
)
57
abort
();
58
59
if
(
a3
.
a3c
!=
'o'
)
60
abort
();
61
if
(
a3
.
a3p
[
0
] !=
'w'
)
62
abort
();
63
if
(
a3
.
a3p
[
1
] !=
'x'
)
64
abort
();
65
66
if
(
a4
.
a4c
!=
'9'
)
67
abort
();
68
if
(
a4
.
a4p
[
0
] !=
'e'
)
69
abort
();
70
if
(
a4
.
a4p
[
1
] !=
'b'
)
71
abort
();
72
73
return
0
;
74
}