This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/2898: Illegal function return in ARM code when compiling with-mthumb-interwork -O2
- To: Philip Blundell <philb at gnu dot org>
- Subject: Re: c/2898: Illegal function return in ARM code when compiling with-mthumb-interwork -O2
- From: Thomas Rauscher <trauscher at loytec dot com>
- Date: Wed, 23 May 2001 18:54:44 +0200 (CEST)
- cc: <trauscher at loytec dot com>, <gcc-gnats at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
On Tue, 22 May 2001, Philip Blundell wrote:
> >When compiling for an ARM target with -mthumb-interwork and -02 or higher
> >optimization,
> >the compiler does not correctly return with the BX instruction but loads
> >the PC directly. Thus, the function cannot be called from THUMB code
> >safely.
>
> Thanks for your bug report.
>
> I think the patch below should fix this problem (which, incidentally, is a
> regression from 2.95).
>
> p.
>
The patch appearently solved the problem. I didn't get the compiler to
produce illegal code any longer.
Thanks,
Thomas