diff --git a/tests/regression/79-assembly/04-asm-modified-since-setjmp.c b/tests/regression/79-assembly/04-asm-modified-since-setjmp.c new file mode 100644 index 0000000000..dcc6dedab7 --- /dev/null +++ b/tests/regression/79-assembly/04-asm-modified-since-setjmp.c @@ -0,0 +1,20 @@ +#include + +jmp_buf buf; + +int main(void) { + int x; +start: + x = 5; + if (setjmp(buf)) { + //read + asm ("nop" : : "x" (x)); + return 0; + } else { + //write + asm goto ("nop" : "=x" (x) : : : exit2, exit); //WARN + longjmp(buf, 1); + } +exit2: +exit: return 0; +}