Re: gcc4 optimization problems on intel mac
Re: gcc4 optimization problems on intel mac
- Subject: Re: gcc4 optimization problems on intel mac
- From: glenn andreas <email@hidden>
- Date: Tue, 23 Jan 2007 15:58:17 -0600
On Jan 23, 2007, at 3:34 PM, Paul Walmsley wrote:
Both of these problems only existed in our release builds, and
after some tweaking and testing, I determined that the problem was
related specifically to the optimization settings in GCC4. Under
*any* setting except -O0, these strange behaviors would reappear,
though without optimization everything runs normally.
I wouldn't necessarily assume that the bug is in compiler's
optimisation (though of course it can never be ruled out). I've
come across many 'release build only' bugs in the past that have
emerged as a result of the various differences between debug and
release builds. A few of the things to try would be:
I once had a problem where I had an array of (Altivec/SSE) vectors as
well as a pointer to them (of a type that was a union of that allowed
for accessing of the individual vector elements). Depending on the
optimization settings, changes from one would not always be reflected
in the other, though the exact details are slipping my mind, but
changing it to be an array of those unions and explicitly accessing
the vector version via the union fixed the problem.
There are also the subtle and more general issues of "pointer aliasing"
It was definitely one of those "works fine in debug, and release on
PPC but not release on x86" problems...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium2 | build, mutate, evolve, animate | images, textures,
fractals, art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden