diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr8788-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr8788-1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr8788-1.c b/gcc/testsuite/gcc.dg/pr8788-1.c new file mode 100644 index 000000000..74e169409 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr8788-1.c @@ -0,0 +1,20 @@ +/* PR inline-asm/8788 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +typedef struct { + long x[6]; +} myjmp_buf; + +typedef struct { + myjmp_buf regs; +} my_stack; + +void switch_to_stack (my_stack *stack){ + asm ( /* { dg-error "impossible constraint" } */ +/* { dg-warning "asm operand 1" "asm operand 1" { target *-*-* } 14 } */ + "\n" + : "+r" (stack->regs) + ); +} + |