I'm compiling code for the F28335 using CCS5 and the 6.0.3 compiler. When I #include <cmath> and call modf( float, float* ) I get an infinite loop. Checking the assembly, it appears the modf( float, float* ) function calls itself in an infinite loop. I've worked around this issue for now by using the double version of the function, but this needs to be fixed. Here's the generated assembly of the loop:
;***************************************************************
;* FNAME: _modf__3stdFfPf FR SIZE: 0 *
;* *
;* FUNCTION ENVIRONMENT *
;* *
;* FUNCTION PROPERTIES *
;* 0 Parameter, 0 Auto, 0 SOE *
;***************************************************************
_modf__3stdFfPf:
;*** ----------------------- #pragma LOOP_FLAGS(4096u)
$C$L10:
;*** -----------------------g2:
;*** 198 ----------------------- return modf(x, y);
;*** ; tail recursive call occurs here
;*** 198 ----------------------- goto g2;
BF $C$L10,UNC ; [CPU_] |198|
; branch occurs ; [] |198|