Ticket #1019 (closed defect: wontfix)

Opened 11 years ago

Last modified 10 years ago

Possible cross-compiler bug involving type coercion

Reported by: mail@… Owned by: mickey
Priority: high Milestone:
Component: unknown Version: 2007.2
Severity: normal Keywords:
Cc: buglog@…, balrogg@…, john_lee@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:


I'm not sure if this is actually a bug or is just due to some undefined behavior
in the program. Anyway, the following test code:

#include <stdio.h>
void P(unsigned int a, unsigned int b)

printf("%08X %08X\n", a, b);


int x = 0xfedcba98;

int main(int argc, char *argv[])

double Z = -2.0;
P( x +(int)(50*Z), x + 50 * Z);

return 0;

will print "FEDCBA34 FEDCBA34" when compiled and run on x86 Linux or on Powerpc
OSX. However, when cross-compiled and run on my Neo1973 it prints "FEDCBA34
00000000". This is the same with -O3 optimization or with no optimization. No
compiler warnings are produced.

$build/tmp/cross/bin/arm-angstrom-linux-gnueabi-gcc --version
arm-angstrom-linux-gnueabi-gcc (GCC) 4.1.2

The compiler was built today (2007-11-21) using 2007.2 MokoMakefile?.

Change History

comment:1 Changed 11 years ago by balrogg@…

  • Cc balrogg@… added

comment:2 Changed 11 years ago by roh

  • Owner changed from mickey@… to mickeyl

comment:3 Changed 11 years ago by roh

  • Owner changed from mickeyl to mickey

comment:4 Changed 10 years ago by john_lee

  • Cc john_lee@… added
  • HasPatchForReview unset
  • Component changed from OE bitbake recipes / build system to unknown

comment:5 Changed 10 years ago by mickey

  • Status changed from new to assigned

comment:6 Changed 10 years ago by mickey

  • Status changed from assigned to closed
  • Resolution set to wontfix

Can you please recheck this with current tools? If it happens again, please report upstream to bugs.openembedded.net

Thanks for your cooperation!

Note: See TracTickets for help on using tickets.