This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need Optimizer bug workaround


Tina VanRoggen writes:
 > This is on Xcode 2.2.1, GCC 4.0.1.  The source code 
 > is quite old and runs on multiple platforms using 
 > other compilers.  The following call to SetupParameter 
 > passes in garbage for the pl variable when using the 
 > -Os (fastest/smallest) optimization.  Using -O1 
 > optimization works properly.  
 > 
 > My question is: is there a compiler flag that we can 
 > use with -Os that will turn off the optimization that 
 > is causing the problem?  We'd rather not use only
 > -O1 optimization.  There is likely other
 > code in our app that will have the same problem.
 > Thanks.

I agree with Graham Stott, -fno-strict-aliasing will do the trick, but
you'd be much better off fixing your code.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]