view gcc/testsuite/c-c++-common/pr43395.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* PR c/43395 */
/* { dg-do compile } */
/* { dg-require-effective-target label_values } */

void *
foo (void)
{
 lab:
  return &&lab;
/* { dg-warning "address of label" "" { target *-*-* } .-1 } */
}

void *
bar (void)
{
  __label__ lab;
 lab:
  return &&lab;
/* { dg-warning "address of label" "" { target *-*-* } .-1 } */
}

void *
baz (void)
{
  int i;
  return &i;
/* { dg-warning "address of local variable" "" { target *-*-* } .-1 } */
}