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

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

/* PR middle-end/51768 */
/* { dg-do compile } */
/* { dg-options "" } */

void
foo (void)
{
  asm goto ("" : : : : lab, lab, lab2, lab);	/* { dg-error "duplicate 'asm' operand name" } */
lab:;
lab2:;
}

void
bar (void)
{
  asm goto ("" : : [lab] "i" (0) : : lab);	/* { dg-error "duplicate 'asm' operand name" } */
lab:;
}

void
baz (void)
{
  int x;
  asm ("" : [lab] "=r" (x) : [lab] "r" (x));	/* { dg-error "duplicate 'asm' operand name" } */
}