This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Possible optimizer bug on sparc-solaris?
- From: "Eric Botcazou" <ebotcazou at libertysurf dot fr>
- To: <Warren_Baird at cimmetry dot com>
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 30 Jul 2003 19:07:07 +0200
- Subject: Re: Possible optimizer bug on sparc-solaris?
- References: <85256D6B.00599786.00@www.cimmetry.com>
> 0xfb3437ac <MyFunc+1468>: mov 1, %i0
> 0xfb3437b0 <MyFunc+1472>: call 0xfb3a415c <__JCR_LIST__+4900>
> 0xfb3437b4 <MyFunc+1476>: add %o7, -3904, %o7
> 0xfb3437b8 <MyFunc+1480>: fcmped %f6, %f8
> 0xfb3437bc <MyFunc+1484>: nop
> 0xfb3437c0 <MyFunc+1488>: fbuge 0xfb343760
>
> I don't know much about sparc assembly, but it looks like it always
> executes the statement immediately following the 'call' before
> actually executing the call, so 0xfb3437b4 is executed *before* we go
> into the call to free,
Yes, this instruction is in the delay slot so it is effectively executed
before the call.
> Two questions: Does this look like an optimizer bug?
Certainly, if it is present at -O2 but not at -O1.
> If so, is it worth submitting a bug report without a standalone chunk of
> code that repros the problem?
No, this would be a sheer waste of time. We really need a (small if
possible) self-contained testcase in order to debug the compiler.
> Is there perhaps a way to tell the optimizer to just ignore register
> %o7 when optimizing? It might hurt performance a little, but if it
> avoids crashes like this it might be worth it to us.
It would be better to pinpoint and fix the real bug.
> I know 3.2.2 is a bit old now, but I looked through the fixed bugs
> list for gcc-3.2.3 and gcc-3.3 and couldn't see anything related to
> this issue.
At this point we're not really interested in fixing bugs in GCC 3.2.x so it
might be more useful to try with the upcoming GCC 3.3.1. However, if you can
produce a testcase with GCC 3.2.2 (see http://gcc.gnu.org/bugs.html), file a
bug report with Bugzilla.
- Eric