summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr51768.c
blob: 082594ccad7a1aac9b67eba4cecb1bcfc3370fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* 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" } */
}