[Bug tree-optimization/103986] [9/10 Regression] Miscompilation with -O2 -funswitch-loops and __builtin_unreachable

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 12 03:59:50 GMT 2022


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[9/10 Regression]           |[9/10 Regression]
                   |Miscompilation with -O2     |Miscompilation with -O2
                   |-funswitch-loops and        |-funswitch-loops and
                   |__builtin_unreachable in    |__builtin_unreachable
                   |ternary operator            |

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note ?: is not the difference as I can reproduce it with:

#define assume(Expression) do { if((Expression)) (void)0; else
__builtin_unreachable(); } while(0)


More information about the Gcc-bugs mailing list