[Bug target/81580] [ARM] C++ zero-sized array generates undefined instruction.
ktkachov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 27 09:29:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81580
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |ktkachov at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from ktkachov at gcc dot gnu.org ---
That inst is the trap instruction that is inserted by the isolate-paths pass
because it detects undefined behaviour.
While the result of calling data() is unspecified, this is not what the
testcase is doing. It's using operator[] which performs an access to the
underlying storage directly and is thus out of bounds and undefined
More information about the Gcc-bugs
mailing list