Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
markorman
PostPosted: Jun 20, 2012 - 03:01 PM
Rookie


Joined: Feb 17, 2008
Posts: 33


I have a problem with optimization in my project.
If i compile with -O2 everything works fine. But when i use -O3 some functions doen't work properly anymore. I found out that source of this problem is optimization flag -finline-functions. Also when using this flag code size increase from ~33K to ~56K bytes. But the program runs a lot faster (sreen refreshes lot faster). Problem is that when i use certain function, one another doesn't work anymore.

I this know "bug"? what causes this?
 
 View user's profile Send private message  
Reply with quote Back to top
clawson
PostPosted: Jun 20, 2012 - 03:23 PM
10k+ Postman


Joined: Jul 18, 2005
Posts: 62341
Location: (using avr-gcc in) Finchingfield, Essex, England

It sounds like the program might inadvertently be dependent on the small delay introduced by CALL/RET function invocation.

BTW what version of avr-gcc are you talking about? Some builds (especially in some Linux repositories) are known to have problems.

_________________
 
 View user's profile Send private message  
Reply with quote Back to top
sternst
PostPosted: Jun 20, 2012 - 04:14 PM
Raving lunatic


Joined: Jul 23, 2001
Posts: 2439
Location: Osnabrueck, Germany

Another possibility is inline-assembly with incorrect constraints.

_________________
Stefan Ernst
 
 View user's profile Send private message  
Reply with quote Back to top
markorman
PostPosted: Jun 20, 2012 - 05:07 PM
Rookie


Joined: Feb 17, 2008
Posts: 33


clawson wrote:

BTW what version of avr-gcc are you talking about? Some builds (especially in some Linux repositories) are known to have problems.


gcc version 4.3.3 WinAVR 20100110
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits