[Bug tree-optimization/84595] __builtin_trap() causes optimizer to remove code

danielgutson at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 27 16:39:00 GMT 2018


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

--- Comment #3 from Daniel Gutson <danielgutson at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> What you want is __builtin_breakpoint (if that existed).  Trap is considered
> as noreturn just like abort/exit.

OK. That was my second suggested alternative.
BTW I didn't see __builtin_trap documented as noreturn in the documentation.


More information about the Gcc-bugs mailing list