libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr80163.c
blobf65955c0ec953ac54561572adc47805ce52f0609
1 /* PR middle-end/80163 */
2 /* { dg-do compile { target int128 } } */
3 /* { dg-options "-O0" } */
5 typedef __INTPTR_TYPE__ intptr_t;
6 void bar (void);
8 __int128_t *
9 foo (void)
12 bar ();
13 b:;
14 static __int128_t d = (intptr_t) &&a - (intptr_t) &&b; /* { dg-error "initializer element is not computable at load time" } */
15 return &d;
18 __int128_t *
19 baz (void)
21 static __int128_t d = (long) (3 * 4);
22 return &d;