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
/
tree-ssa
/
ssa-fre-24.c
blob
83bd175522e3bbb1f2af2ee911efa094005754d0
1
/* { dg-do compile } */
2
/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1" } */
3
4
int
foo
(
void
)
5
{
6
int
a
[
16
] = {};
7
return
a
[
3
];
8
}
9
10
int
bar
(
void
)
11
{
12
int
a
[
16
];
13
__builtin_memset
(
a
,
0
,
sizeof
(
a
));
14
return
a
[
3
];
15
}
16
17
struct
X
{
int
i
; };
18
int
baz
(
void
)
19
{
20
struct
X a
,
b
;
21
a
.
i
=
0
;
22
b
=
a
;
23
return
b
.
i
;
24
}
25
26
int
bazzoo
(
void
)
27
{
28
struct
X b
,
a
= {};
29
b
=
a
;
30
return
b
.
i
;
31
}
32
33
/* { dg-final { scan-tree-dump-times "return 0;" 4 "fre1" } } */