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/85927] ud2 instruction generated starting with gcc 8


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85927

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't see the issue with the ud2 instruction here.  The only valid thing is
for basic inline-asm statements in the functions which have the naked
attribute.  It is undefined if using anything besides basic inline-asm as
documented in the documentation.  ud2 is basically a trap to force the
developer to return from the function inside the basic inline-asm.  The
original code had two undefined issues:
1) Used extended inline-asm
2) Use C code

GCC decided it was just undefined at runtime rather to reject it at compile
time.  Unlike clang which decided to reject it at compile time.

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