This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Mainline fails to build
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Janis Johnson <janis187 at us dot ibm dot com>, magfr at lysator dot liu dot se, gcc at gcc dot gnu dot org
- Date: Fri, 31 May 2002 09:42:07 -0700
- Subject: Re: Mainline fails to build
- References: <janis187@us.ibm.com> <200205311635.MAA28784@makai.watson.ibm.com>
On Fri, May 31, 2002 at 12:35:07PM -0400, David Edelsohn wrote:
> >>>>> Janis Johnson writes:
>
> Janis> I ran into this too, when I start with GCC 3.0.4 on i686-pc-linux-gnu.
> Janis> The stage1 compiler is miscompiled in function num_equality_op in
> Janis> cppexp.c:
>
> Janis> Dump of assembler code for function num_equality_op:
> Janis> 0x8089970 <num_equality_op>: push %ebp
> Janis> 0x8089971 <num_equality_op+1>: mov %esp,%ebp
> Janis> 0x8089973 <num_equality_op+3>: movl $0x0,0x14(%ebp) <--- store new value
> Janis> 0x808997a <num_equality_op+10>: mov 0x14(%ebp),%eax <--- load old (oops)
> Janis> 0x808997d <num_equality_op+13>: cmp 0x20(%ebp),%eax
> Janis> 0x8089980 <num_equality_op+16>: jne 0x8089991 <num_equality_op+33>
>
> Janis> lhs.low is stored into before the old value is loaded.
>
> This looks very similar to the PowerPC regression I reported
> yesterday of a register being overwritten by a load of zero before the old
> value is used.
>
> David
In the case I reported it's GCC 3.0.4 that is generating incorrect code
when compiling the mainline. It might be the same intermittent problem,
though. Let me know if there's more information I can provide.
Janis