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

Re: Short Displacement Problems.


On Wed, 29 May 2002, Joern Rennecke said:
> In general, the most important subproblem is to find the best stack slots for
> register spills.  -O2 is notoriously bad at this, because the registers that
> are spilled last get the largest offsets.  -O2 -fomit-frame-pointer, OTOH,
> gives the last stilled registers the smallest offset.

But -fomit-frame-pointer has other nasty bugs (but maybe this is only on
IA32).

It miscompiles at least GiNaC (-> segfaults) and GCC itself on i586 with
-O2 (-> all exception throws/catches in code compiled by a compiler
built with this flag dump core.) I'd report this to GNATS if I could get
a decent minimal testcase, but I don't have a *clue* how to debug a
problem with -fomit-frame-pointer, because the switch by its very nature
makes debugging so damn hard.

Anyone know how to debug this sort of problem? I tried for some time in
the GCC-3.0.x days and eventually gave up (3.0.x had the same bug).

-- 
`What happened?'
                 `Nick shipped buggy code!'
                                             `Oh, no dinner for him...'


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