This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc.dg/debug/debug-[12].c failures on cmov targets
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 3 Dec 2003 08:09:40 +0100
- Subject: 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