This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: Inlining segfault]
- To: Bill Currie <bill at taniwha dot tssc dot co dot nz>
- Subject: Re: [Fwd: Inlining segfault]
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 26 Jul 1998 01:05:58 -0600
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <35BAB683.6E774F7D@taniwha.tssc.co.nz>you write:
> xgcc: Internal compiler error: program cc1 got fatal signal 11
>
> ---foo.c---
> static __inline__ unsigned char BCD(unsigned char binval)
> {
> if (binval > 99) return 0x99;
> return (((binval/10) << 4) | (binval%10));
> }
>
> void int1a(unsigned char i)
> {
> (*((unsigned char *)1)) = BCD(i);
> }
> -----------
>
> If either line in BCD is commented out or the pointer/cast assignment is
> changed to a variable (eg i), the error disappears. Also, the error
> does not occur for optimisation levels less than 2 (ie -O0 and -O1
> successfully compile the code).
Fixed in both the mainline and egcs-1.1. Testcase added to the
mainline tree too.
Thanks!
jeff