[Bug ada/12959] Range checking code bug/optimizations
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 8 08:05:00 GMT 2003
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-08 08:05 -------
This part:
-- This sequence appears to be checking for X = null. In fact, what it is
-- really doing is checking for X(1)'Access = null.
--
-- The compiler is going out of its way to cache X(X'First)'Access.
-- The problem with the whole X(1)'Access approach is that it allocates
-- a register (edx) to hold a value of no import. Since the x86 has a dearth
-- of registers to begin with, why not simply hold on to X.Access and
-- displace X by the dope vector size (8 bytes). There doesn't appear to be
-- any register pressure in this procedure, but why allocate an unnecessary
-- register?
Looks like an Ada frontend bug and produces worse code for the PPC because storing on the stack.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12959
More information about the Gcc-bugs
mailing list