This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc.dg/debug/debug-[12].c failures on cmov targets


Hi,

These two testcases fail on some targets with conditional moves (e.g. 
SPARC64) because a whole block is folded into the result at -O:

/* Verify that the scheduler does not discard the lexical block.  */
/* { dg-do compile } */
/* { dg-options "-dA" } */
/* { dg-final { scan-assembler "xyzzy" } } */
long foo(long p)
{
  {
    long xyzzy = 0;
    if (p)
      xyzzy = 2;
    return xyzzy;
  }
}

is folded into

long foo(long p)
{
   return p ? 2 : 0;
}

so the lexical block containing xyzzy is discarded and the variable with it.


Is this "fixable"? Is this worth "fixing"? Or can we XFAIL them, on the 
grounds that they don't exercise what they are supposed to?

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]