[Tinyos-devel] FTSP not working with mspgcc 4.5.3 and -Os

Peter Bigot bigotp at acm.org
Mon Feb 20 04:46:28 PST 2012

On Sun, Feb 19, 2012 at 11:42 PM, Thomas Schmid <thomas.schmid at gmail.com> wrote:
> Hi all,
> We found a bug in msp430-gcc 4.5.3 while compiling FTSP (more
> specifically FtspLpl). It took us a while to pinpoint the problem, but
> it looks like mspgcc's optimization makes a mistake when multiplying
> two 64-bit integers (lines 216 and 217 in TimeSyncP.nc). For some
> reason, those multiplications produce super big numbers, even if the
> inputs are small. Turning off -Os and using -O1 or -O2 fixes the
> problem, and the multiplications work. Going one higher to -O3 has the
> same result as -Os.
> I looked at the diffs of the disassembled code of the binaries, and
> there is clearly a difference in those sections. However, my msp430
> assembly isn't good enough to actually understand what the problem
> could be.
> Any suggestions on how to track this further down?

Replicate the problem in a standalone C program and submit a bug on


> Cheers,
> - Thomas
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel

More information about the Tinyos-devel mailing list