This is the mail archive of the gcc-patches@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]

Patch: fix temp slot allocation bug


This change

2004-10-11 Andrew Pinski <pinskia@physics.uc.edu

        PR middle-end/16266
        * function.c (temp_slots_at_level): Fix typo which creates too
        many temp stack slots levels.

caused a failure in Darwin's mixed mode (32 bit ABI, 64 bit registers):
it gets into the code below, where preserve_temp_slots gets
called when temp_slot_level is 0, which crashes.  I believe the
change above is correct and the fix for the exposed bug is below.
Bootstrapped.  OK?

(It would be better not to get into this code; there is no reason to use
a memory temp in this case.  It does so only because
rewrite_out_of_ssa produces this, removing the temp for the call result:

return (intD.0) ((unsigned intD.3) xyzzy (xD.1115) & (unsigned intD.3) set_maskD.1112[xD.1115]);

It can do that only for pure functions, but even so I don't see the
advantage; why not leave the temporary there?  The calls.c code
could probably be made smarter in this case, too.

But that's a different bug; the code below is clearly wrong IMO.)


2004-11-13 Dale Johannesen <dalej@appple.com>


* calls.c (expand_call): Make sure temp slot nesting level is > 0
when calling preserve_temp_slots.


Attachment: callpatch.txt
Description: Text document

Attachment: 20041111-1.c
Description: Text document



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