aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/msp430/operand-modifiers-bad.c
blob: 3ff479313292feea89f1cfe063ff4a63b91f36c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */

void
foo (void)
{
  char reg = 10;
  __asm__ ("mov.b %d1, %0\n" : "=r" (reg) : "r" (reg));
  /* { dg-error "invalid 'asm': %d, %e, %f, %g operand modifiers are for memory references or constant values only" "" { target *-*-* } .-1 } */
  __asm__ ("mov.b %e1, %0\n" : "=r" (reg) : "r" (reg));
  /* { dg-error "invalid 'asm': %d, %e, %f, %g operand modifiers are for memory references or constant values only" "" { target *-*-* } .-1 } */
  __asm__ ("mov.b %f1, %0\n" : "=r" (reg) : "r" (reg));
  /* { dg-error "invalid 'asm': %d, %e, %f, %g operand modifiers are for memory references or constant values only" "" { target *-*-* } .-1 } */
  __asm__ ("mov.b %g1, %0\n" : "=r" (reg) : "r" (reg));
  /* { dg-error "invalid 'asm': %d, %e, %f, %g operand modifiers are for memory references or constant values only" "" { target *-*-* } .-1 } */
}