view gcc/testsuite/gcc.dg/pr80163.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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;
}