mingw hosted arm-elf output differs from linux hosted arm-elf when compiling with -Os

Ian Lance Taylor iant@google.com
Fri Apr 3 14:23:00 GMT 2009

"Andreas Karlsson" <andreas.karlsson@rt-labs.com> writes:

>>This is most likely a bug.  Unfortunately, this type of bug can be
>>somewhat painful to pin down.  There are a number of possible causes.
>>One possible cause is the problem identified in
> I've tried the solution mentioned above and it makes no difference, any
> other suggestion or should we accept the fact and call it an (un)harmful
> feature? Personal I would prefer to get it byte for byte identical. 

It's a bug, not a feature.  I don't have any further suggestions other
than debugging.  The first debugging step would be to produce all the
dump files and compare them to see where the first difference occurs
(use -fdump-unnumbered to remove irrelevant addresses).  That should let
you identify which pass causes the difference.  Unfortunately after that
it is just a matter of debugging to find out why the difference occurs.

I would encourage you to file a bug report with precise and complete
steps for how to recreate the problem.  See http://gcc.gnu.org/bugs.html

> Btw, the solution wasn't implemented in the gcc-4.2.2 and the ChangeLog
> didn't mention why or why not.

The bug was identified after gcc 4.2.1 was released, and was not
considered serious enough to be fixed on a release branch.  After doing
a release bug fixes on the release branch are restricted to regressions
from past releases or generation of invalid code.


More information about the Gcc-help mailing list