summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/asmgoto-2.c
blob: 5bf45725d80e47693088aa90339445754ad25b62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "" } */

void
foo (void)
{
  __label__ lab;
  int i = 0;
  asm goto ("" : : : : lab);
  asm goto ("" : "=r" (i) : : : lab);	/* { dg-error "expected" } */
  asm goto ("" : : : : );	/* { dg-error "expected" } */
  asm goto ("" : : : "memory");	/* { dg-error "expected" } */
  asm goto ("" : : : );		/* { dg-error "expected" } */
  asm goto ("" : : "r" (i));	/* { dg-error "expected" } */
  asm goto ("" : : );		/* { dg-error "expected" } */
  asm goto ("" : "=r" (i));	/* { dg-error "expected" } */
  asm goto ("" : );		/* { dg-error "expected" } */
  asm goto ("");		/* { dg-error "expected" } */
  lab:;
}