[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #34423] util/crc16.h: with -Os option inline functio

From: Joerg Wunsch
Subject: [avr-libc-dev] [bug #34423] util/crc16.h: with -Os option inline functions are called causing registers value loss
Date: Fri, 30 Sep 2011 13:42:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv: Gecko/2010071610 Firefox/3.0.19

Update of bug #34423 (project avr-libc):

                  Status:                    None => Invalid                
             Assigned to:                    None => joerg_wunsch           
             Open/Closed:                    Open => Closed                 


Follow-up Comment #3:

> The main problem with this project is the fact that the
> MSB of temperature is incorrect. GCC uses register r27
> with undefined value instead of r14 containing MSB.

Exactly, this is my analysis, too, and this rather clearly
appears to be a compiler bug to me.

Forcing the compiler to inline the CRC function simply hides
that bug, but it's not a solution.  With -Os, the compiler
is really right to not inline it, as this causes a smaller
code size.  (Switching to -O2 is already sufficient to
inline it.)

Closing as "invalid" since there is nothing avr-libc can
do about here.  Please open a GCC bug report for it, and
don't forget to add the preprocessed sourcecode there.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]