summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr80163.c
blob: 37a7abd1181d888fc9329e23858b2e487e99b1af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR middle-end/80163 */
/* { dg-do compile { target int128 } } */
/* { dg-options "-O0" } */

void bar (void);

__int128_t *
foo (void)
{
a:
  bar ();
b:;
  static __int128_t d = (long) &&a - (long) &&b;	/* { dg-error "initializer element is not computable at load time" } */
  return &d;
}

__int128_t *
baz (void)
{
  static __int128_t d = (long) (3 * 4);
  return &d;
}