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

            Bug ID: 122040
           Summary: -fisolate-erroneous-paths-dereference turns division
                    by zero into a trap but the behavior is undocumented
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xry111 at gcc dot gnu.org
  Target Milestone: ---

With -fisolate-erroneous-paths-dereference, the function

int test(int a) { return a / 0; }

will be compiled to an ud2.  IMO the behavior is correct, however the document
of -fisolate-erroneous-paths-dereference only mentions "Detect paths that
trigger erroneous or undefined behavior due to dereferencing a null pointer"
but there's no pointer deference here.

Reply via email to