Subject: Re: B19 compiler fail - on debug but not optimised
From: [email-masked] (Kris Thielemans)

9 Mar 1998 16:08:13 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: <[email-masked]>
Cc: "Gnuwin" <[email-masked]>

Hi,

>
>
>We have just moved to b19 and our project failed miserably, it compiled but
>did not run. After much poking about in the
>assmbler we discovered an odd switch which ended up jumping to part way
>through an instruction. We recoded this as an if then else sequence and all
>was fine. We then looked more deeply and extracted the failing source. We
>also noted that if we compile with -O3 it all works.
>
<snip>

we recently had a similar problem with gcc 2.7.2.2 on AIX powerPC. Before I
got a chance to dig deep enough into gcc, that problem was fixed in gcc
2.8.0. But maybe my experiences from then help you/someone.

The PowerPC problem had to do with alignment of code (it cropped up when
assigning floats to ints, as in another recent mail on this list). For some
gcc targets, there is an option -mstrict-align. Unfortunately this is not
available for 386, but you can dig into the gcc source to find out which
variable it will set. For the PowerPC, this variable has to be set always.
It looks like this has to be done for 386 as well.

Kris

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".