PR rtl-optimization/87918
[official-gcc.git] / gcc / testsuite / gcc.target / msp430 / special-regs.c
blobc9121e62b6ba1dc9221b3b92f9038adc25ef4b83
1 /* { dg-do compile } */
3 int foo (void)
5 register int pc __asm__("R0");
6 register int sp __asm__("R1");
7 register int cg1 __asm__("R2"); /* { dg-error "the register specified for 'cg1' is not general enough" } */
8 register int cg2 __asm__("R3"); /* { dg-error "the register specified for 'cg2' is not general enough" } */
10 asm("" : "=r"(pc));
11 asm("" : "=r"(sp));
12 asm("" : "=r"(cg1));
13 asm("" : "=r"(cg2));
15 return pc + sp + cg1 + cg2;