view gcc/testsuite/gcc.dg/pr8788-1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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 *-*-* } .-1 } */
        "\n"
        : "+r" (stack->regs)
    );
}