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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It turns out IVOPTs only incompletely honors -fwrapv-pointer.  There's also
vague documentation that says

@opindex fwrapv-pointer
@opindex fno-wrapv-pointer
@item -fwrapv-pointer
This option instructs the compiler to assume that pointer arithmetic
overflow on addition and subtraction wraps around using twos-complement
representation.  This flag disables some optimizations which assume
pointer overflow is invalid.

failing to notice the (intended?) impact on for example the C language
constraints of pointer arithmetic which is not so much about
wrapping vs. non-wrapping but about pointers that cross the boundary
of types.  This is also not honored by points-to analysis and alias
analysis in general.

Reply via email to