This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/31938] Wrong code on int to short cast on armeb
- From: "mikpe at it dot uu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2007 19:48:51 -0000
- Subject: [Bug target/31938] Wrong code on int to short cast on armeb
- References: <bug-31938-14550@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from mikpe at it dot uu dot se 2007-05-31 19:48 -------
I cannot reproduce this on an armv5b-softvfp-linux machine, with either
gcc-3.3.6, gcc-4.0.4, gcc-4.1.2, or gcc-4.2.0 (all bootstrapped natively on the
arm machine).
However, I suspect your test case is wrong. Unpatched versions of gcc default
to little-endian mode on arm, even if you configure with
--target=arm${foo}b-${bar}.
Since you didn't pass -mbig-endian when compiling the test case, gcc will
generate code assuming little-endian data representation. The assembly code you
listed is actually correct for little-endian.
--
mikpe at it dot uu dot se changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu dot se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31938