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

            Bug ID: 106811
           Summary: GENERIC and GIMPLE IL undefined behavior needs
                    documenting
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

Undefined behavior triggered by the GENERIC operations from tree.def (also used
in GIMPLE) need to be documented.  In general we follow C here, including GCCs
implementation defined behavior here, but not all C undefined behavior cases
are exploited by the middle-end so the state of those cases is not clear.  We
need

 - a list of operations with undefined behavior cases that are currently
 exploited or seen as OK to exploit
 - a list of operations where C documents undefined behavior cases but the
 middle-end conciously defines some implementation defined behavior (which
 should not be target specific)
 - middle-end predicates that can be used to check
 - variants of the operations with (implementation) defined behavior

probably best in generic.texi with cross reference from gimple.texi

Note for RTL operations doing the same is necessary.

Reply via email to