This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: latest CVS bootstrap failure on Solaris with Sun cc.
- To: Kim Sebo <kim at mso dot anu dot edu dot au>
- Subject: Re: latest CVS bootstrap failure on Solaris with Sun cc.
- From: Casper Dik <casper at holland dot sun dot com>
- Date: Thu, 14 Oct 1999 12:56:37 +0200
- cc: gcc-bugs at gcc dot gnu dot org
>The code in flow.c is:
>> if ((flags & PROP_KILL_DEAD_CODE)
>> && insn_is_dead
>> && reload_completed
>> && (HAVE_epilogue || HAVE_prologue)
>> && prologue_epilogue_contains (insn))
>> {
>
>The function prologue_epilogue_contains() is defined in function.c,
>within a #if(HAVE_prologue || HAVE_epilogue).
This is bbviously incorrect C.
>Apparently,HAVE_{epi,pro}logue are not set under Solaris/sparc, so
>prologue_epilogue_contains() is not defined in function.c. However,
>in flow.c, the call to it still survives despite earlier parts of the
>boolean expression being false. It seems that the Sun compilers
>are not doing short-circuit boolean evaluation properly?
They do, but if you don't do any optimizations, all code will be
generated (pessimizing compiler) and the code to call
prologue_epilogue_contains will also be present and linkng will fail.
The code calls a function that doesnt' exist, so the code is faulty.
>The failure boils down to the following short test case, which
>compiles OK under gcc 2.96 19991006, but fails under Sun cc 4.2 and
>5.0. (Note if the "if" test is changed to "if((a||b)&&foo())",
>this code compiles OK with the Sun compilers.
Try "-O" with the Sun compilers and the code will compile.
But that doesn't make the code correct.
Casper