This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Short Displacement Problems.
- From: Nix <nix at esperi dot demon dot co dot uk>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: "Naveen Sharma, Noida" <naveens at noida dot hcltech dot com>, law at redhat dot com, Alexandre Oliva <aoliva at redhat dot com>, bernds at redhat dot com, gniibe at m17n dot org, Richard Henderson <rth at redhat dot com>, gcc at gcc dot gnu dot org
- Date: 30 May 2002 20:36:25 +0100
- Subject: Re: Short Displacement Problems.
- References: <E04CF3F88ACBD5119EFE00508BBB212102DB444C@exch-01.noida.hcltech.com><3CF4DE6A.98547816@superh.com>
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...'