From owner-freebsd-current Mon Dec 20 9:53:13 1999 Delivered-To: freebsd-current@freebsd.org Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by hub.freebsd.org (Postfix) with ESMTP id 11A1514BD6 for ; Mon, 20 Dec 1999 09:53:11 -0800 (PST) (envelope-from bmilekic@dsuper.net) Received: from oracle.dsuper.net (oracle.dsuper.net [205.205.255.1]) by oracle.dsuper.net (8.9.3/8.9.3) with ESMTP id MAA13358; Mon, 20 Dec 1999 12:52:55 -0500 (EST) Date: Mon, 20 Dec 1999 12:52:55 -0500 (EST) From: Bosko Milekic To: Thomas David Rivers Cc: freebsd-current@FreeBSD.ORG, jwd@unx.sas.com Subject: Re: cc taking a signal 11 In-Reply-To: <199912201637.LAA81110@lakes.dignus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 20 Dec 1999, Thomas David Rivers wrote: !>> FreeBSD(root)/tmp %cc -O foo.c -o foo.o -c !>> cc: Internal compiler error: program cc1 got fatal signal 11 !>> !>> !>> !>> static void getsig11(parfree,dbl,lambda) !>> long parfree; !>> double *dbl; !>> double *lambda; !>> { !>> long i, j; !>> j = -1; !>> for(i = 0; i < parfree; i++) { !>> j += i+1; !>> dbl[j] *= (1.0 + *lambda); !>> } !>> return; !>> } !>> !>> !>> Yes, the algorithm looks funny, but is correct. The program will !>> compile correctly if the 'j += i+1;' is changed to 'j = i+1;' or if !>> the variable 'lambda' is changed from a pointer to an actual value. !>> !>> Anyone want to take a stab at this? I'm not a big compiler !>> person myself... (Dave, you there?). !> !> Yes - I'm here :-) !> !> Typically - signal 11 problems from GNU's front-end are hardware !> memory issues.... !> !> I will add that a quick test on a 3.3 system compiles this just !> fine (Systems/C compiles it as well.) !> !> I would suspect hardware problems first. !> !> As I have learned from painful experience, *always* use ECC or at least !> parity memory... !> !> - Dave R. - This seems to only be an issue if you're compiling with optimization. I *think* it's because the compiler tries to make `j' a register. If you explicitly declare `j' a volatile, you should not get this. Is this correct? Bosko. ...... . . . . . . . . . . . . . Bosko Milekic -- bmilekic@dsuper.net . . . . . . . . . . . ...... . . WWW: http://pages.infinit.net/bmilekic/ . ................................................ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message