This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/60084] GCC 4.8.3 miscompiles code on ARM at -Os optimization level


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]