This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>-----Original Message----- >From: Steve deRosier [mailto:sderosier@vari-lite.com] >Sent: 30 January 2001 18:09 >I am having problems with using optimizations on my xgcc. Without using any >optimizations, my final srec files are over twice as large as I used to get >from the same code compiled with the MRI tools. For gcc, -O0 means *really* no optimisations, including some things that other compilers do by default, such as constant folding... > The problem is, the instant >I turn on any optimizations (at any level of -O, no mater -O1 >through -O3, >-Os also breaks), my code no longer runs properly. Been playing with >various options but I can't seem to come up with anything that works. Well, your code has bugs which are being exposed by the optimizer. One of the most common causes of bugs (I notice you work in embedded s/w) that appear the moment the optimizer is turned on is not using 'volatile' properly on things that need it. Other problems that often don't make themselves noticeable until the optimizer is turned on are use of uninitialized variables, and some buffer overflows. Apart from that I can't offer any terribly specific advice; if this doesn't help, post back to the list with a more detailed description of what target you're using and precisely what problems appear when you switch on the optimizer. good luck, DaveK -- The Boulder Pledge: "Under no circumstances will I ever purchase anything offered to me as the result of an unsolicited email message. Nor will I forward chain letters, petitions, mass mailings, or virus warnings to large numbers of others. This is my contribution to the survival of the online community." ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |