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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
gnu23-tag-composite-4.c
blob
f3cb7369d4a325dfe4ce8c2f2e2720e1a2b64041
1
/* { dg-do run } */
2
/* { dg-options "-O2 -std=gnu23" } */
3
4
// struct with variable size
5
6
7
8
int
9
foo
()
10
{
11
int
n
=
10
;
12
struct
s
{
char
buf
[
n
]; }
s
;
13
{
14
int
m
=
10
;
15
struct
s
{
char
buf
[
m
]; }
t
;
16
typeof
(*(
1
? &
s
: &
t
))
u
;
17
return sizeof
(
u
.
buf
);
18
}
19
}
20
21
int
main
()
22
{
23
if
(
10
!=
foo
())
24
__builtin_abort
();
25
26
return
0
;
27
}
28