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
/
torture
/
20240517-1.c
blob
ab83d3ca6fba20362dcced7062bf11313972ca47
1
/* { dg-do run } */
2
/* { dg-additional-options "-fmerge-all-constants" } */
3
4
char
*
p
;
5
6
char
*
__attribute__
((
noipa
))
7
foo
() {
return
p
+
1
; }
8
9
volatile
int
z
;
10
11
int
main
()
12
{
13
/* ESCAPED = CONST_POOL */
14
p
=
"Hello"
;
15
/* PT = ESCAPED */
16
char
*
x
=
foo
();
17
char
*
y
;
18
/* y PT = CONST_POOL */
19
if
(
z
)
20
y
=
"Baz"
;
21
else
22
y
=
"Hello"
+
1
;
23
if
(
y
!=
x
)
24
__builtin_abort
();
25
return
0
;
26
}