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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-07-13

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
-fisolate-erroneous-paths-dereference is the only one that "elides" the null
dereference but it doesn't currently have a way to optimistically remove it,
instead it places a trap at the path entry unconditionally.  Thus you get

f:
.LFB0:
        .cfi_startproc
        testb   %dil, %dil
        je      .L2
        movl    0, %eax
        ud2
        .p2align 4,,10
        .p2align 3
.L2:
        movl    $42, %eax
        ret

there are duplicate enhancement requests for an option to control this
behavior.  The current default behavior is on purpose.

Reply via email to