This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Linux/PPC gcc 2.95.2 - bad access generated when using inline func
- To: Franz dot Sirl-kernel at lauterbach dot com, geoffk at cygnus dot com
- Subject: Re: Linux/PPC gcc 2.95.2 - bad access generated when using inline func
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 5 Jul 2000 17:22:39 -0700 (PDT)
- Cc: cort at fsmlabs dot com, gcc-bugs at gcc dot gnu dot org
> Date: Wed, 28 Jun 2000 12:06:56 -0700
> From: Geoff Keating <geoffk@cygnus.com>
> To: Franz.Sirl-kernel@lauterbach.com
> CC: cort@fsmlabs.com, gcc-bugs@gcc.gnu.org
> > /* Definitions for __builtin_return_address and __builtin_frame_address.
> > __builtin_return_address (0) should give link register (65), enable
> > this. */
> > /* This should be uncommented, so that the link register is used, but
> > currently this would result in unmatched insns and spilling fixed
> > registers so we'll leave it for another day. When these problems are
> > taken care of one additional fetch will be necessary in RETURN_ADDR_RTX.
> > (mrs) */
> Actually, __builtin_return_address (0) should not give the link
> register, because sometimes the link register holds something else,
> like the return address of something called by this function.
> My suspicion is that the right thing to do is force all functions that
> call __builtin_return_address to have a stack frame... I will think
> about it.
It should be possible to not do this. I'm trying to recall a machine
with the same issue... no luck. Worse case scenario is to add a new
reg (with elimination) for it, be sure to not bust the EH dwarf ABI at
the same time, if you do this.