Message ID | alpine.LSU.2.11.1407280949580.3531@zhemvz.fhfr.qr |
---|---|
State | New |
Headers | show |
On Mon, Jul 28, 2014 at 09:50:24AM +0200, Richard Biener wrote: > --- gcc/testsuite/gcc.target/i386/pr61801.c (revision 0) > +++ gcc/testsuite/gcc.target/i386/pr61801.c (working copy) > @@ -0,0 +1,22 @@ > +/* { dg-do compile } */ > +/* { dg-options "-Os -fcompare-debug" } */ > + > +int a, b, c; > +void fn1 () > +{ > + int d; > + if (fn2 () && !0) > + { > + b = ( > + { > + int e; > + fn3 (); > + switch (0) > + default: > + asm volatile("" : "=a"(e) : "0"(a), ""(0)); How do we reload ""(0)? I'm surprised that we accept it... Jakub
On Mon, Jul 28, 2014 at 10:44:15AM +0200, Jakub Jelinek wrote: > On Mon, Jul 28, 2014 at 09:50:24AM +0200, Richard Biener wrote: > > --- gcc/testsuite/gcc.target/i386/pr61801.c (revision 0) > > +++ gcc/testsuite/gcc.target/i386/pr61801.c (working copy) > > @@ -0,0 +1,22 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-Os -fcompare-debug" } */ > > + > > +int a, b, c; > > +void fn1 () > > +{ > > + int d; > > + if (fn2 () && !0) > > + { > > + b = ( > > + { > > + int e; > > + fn3 (); > > + switch (0) > > + default: > > + asm volatile("" : "=a"(e) : "0"(a), ""(0)); > > How do we reload ""(0)? I'm surprised that we accept it... Seems we fail with -fcompare-debug before the fix even with "i"(0), so my strong preference would be to use that. Jakub
On 2014.07.28 at 10:53 +0200, Jakub Jelinek wrote: > On Mon, Jul 28, 2014 at 10:44:15AM +0200, Jakub Jelinek wrote: > > On Mon, Jul 28, 2014 at 09:50:24AM +0200, Richard Biener wrote: > > > --- gcc/testsuite/gcc.target/i386/pr61801.c (revision 0) > > > +++ gcc/testsuite/gcc.target/i386/pr61801.c (working copy) > > > @@ -0,0 +1,22 @@ > > > +/* { dg-do compile } */ > > > +/* { dg-options "-Os -fcompare-debug" } */ > > > + > > > +int a, b, c; > > > +void fn1 () > > > +{ > > > + int d; > > > + if (fn2 () && !0) > > > + { > > > + b = ( > > > + { > > > + int e; > > > + fn3 (); > > > + switch (0) > > > + default: > > > + asm volatile("" : "=a"(e) : "0"(a), ""(0)); > > > > How do we reload ""(0)? I'm surprised that we accept it... > > Seems we fail with -fcompare-debug before the fix even with > "i"(0), so my strong preference would be to use that. Yes. It was just Creduce going wild. Feel free to fix.
Index: gcc/testsuite/gcc.target/i386/pr61801.c =================================================================== --- gcc/testsuite/gcc.target/i386/pr61801.c (revision 0) +++ gcc/testsuite/gcc.target/i386/pr61801.c (working copy) @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -fcompare-debug" } */ + +int a, b, c; +void fn1 () +{ + int d; + if (fn2 () && !0) + { + b = ( + { + int e; + fn3 (); + switch (0) + default: + asm volatile("" : "=a"(e) : "0"(a), ""(0)); + e; + }); + d = b; + } + c = d; +}