This is the mail archive of the
mailing list for the GCC project.
Re: Optimizer bug related to function pointers
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Optimizer bug related to function pointers
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Fri, 08 Sep 2000 13:26:06 -0700
- cc: Kevin Buettner <kevinb at cygnus dot com>, Jim Wilson <wilson at cygnus dot com>, Geoffrey Keating <geoffk at cygnus dot com>, Bernd Schmidt <bernds at cygnus dot com>, gcc-patches at gcc dot gnu dot org
This doesn't seem to be related to Bernd's recent patch. I can reproduce it
using a toolchain without Bernd's patch.
I think this is mostly the IA-64 backend's fault. We use (symbol_ref func)
to mean two different things, without clearly distinguishing them. We also
have a single call pattern that accepts either a symbol_ref or a register,
even though these aren't exactly the same operation. If we fixed either of
those, then we wouldn't see this problem.
If we want NO_FUNCTION_CSE to work as documented though, then it looks like the
Long term, we probably should get rid of NO_FUNCTION_CSE. It doesn't make much
sense for the backends to define a macro to tell calls.c/cse.c not to do
something. If the backend wants a function address forced to a register,
then the call/call_value patterns should have a predicate that forces it to
a register, or else the backend should use an expander that calls force_reg.
Probably few ports would want to do this. I think most of them set