On 2017.04.20 at 22:29 +0200, Uros Bizjak wrote: > > PR target/79804 > * gcc.target/i386/pr79804.c: New test. > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > Committed to mainline SVN. > --- testsuite/gcc.target/i386/pr79804.c (nonexistent) > +++ testsuite/gcc.target/i386/pr79804.c (working copy) > @@ -0,0 +1,10 @@ > +/* PR target/79804 */ > +/* { dg-do compile } */ > +/* { dg-options "" } */ > + > +void foo (void) > +{ > + register int r20 asm ("20"); > + > + asm volatile ("# %0" : "=r"(r20)); /* { dg-error "invalid use of > register" } */ > +}
The test fails without optimizations: gcc/testsuite/gcc.target/i386/pr79804.c: In function ‘foo’: gcc/testsuite/gcc.target/i386/pr79804.c:10:1: error: frame cannot be used in asm here } ^ gcc/testsuite/gcc.target/i386/pr79804.c:9:3: error: invalid 'asm': invalid use of register 'frame' asm volatile ("# %0" : "=r"(r20)); /* { dg-error "invalid use of register" } */ ^~~ -- Markus