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
c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
nested-vla-3.c
blob
d2ba04adab89ac0add46b5e82602ddb032a7f6b2
1
/* { dg-do run } */
2
/* { dg-options "-std=gnu99" } */
3
/* { dg-require-effective-target trampolines } */
4
5
6
int
main
()
7
{
8
int
n
=
1
;
9
10
char
tmp
[
2
] = {
0
};
11
char
(*
bar
(
void
))[++
n
] {
return
&
tmp
; }
12
13
if
(
2
!=
n
)
14
__builtin_abort
();
15
16
if
(
2
!=
sizeof
(*
bar
()))
17
__builtin_abort
();
18
19
n
=
1
;
20
21
char
(*(*
bar2
)(
void
))[++
n
] =
bar
;
22
23
if
(
2
!=
n
)
24
__builtin_abort
();
25
26
if
(
2
!=
sizeof
(*(*
bar2
)()))
27
__builtin_abort
();
28
29
}
30