This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60084] GCC 4.8.3 miscompiles code on ARM at -Os optimization level
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Feb 2014 19:22:53 +0000
- Subject: [Bug target/60084] GCC 4.8.3 miscompiles code on ARM at -Os optimization level
- Auto-submitted: auto-generated
- References: <bug-60084-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60084
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I get the following warning:
./startup/ROMCopy.c:15:9: warning: array â__S_rompâ assumed to have one element
[enabled by default]
So the code is invalid and undefined. Writing past the bounds of an array is
undefined.
If I add extern to the definition of RomInfo, I get the correct behavior.