Debian Codegraph @

gcc/testsuite/gcc.dg/torture/20240517-1.c

raw
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 }