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

--- Comment #5 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #4)
> Note the libQt6 version of the function looking approximately like this:
> 

This doesn't warn anymore (and doesn't crash either) because objsz cannot get
past the bit_and_expr:

  gimple_assign <plus_expr, _11, data.0_10, 7, NULL>
  gimple_assign <bit_and_expr, _12, _11, 18446744073709551612, NULL>
  gimple_assign <nop_expr, start_13, _12, NULL, NULL>
  gimple_call <__builtin_object_size, _2, start_13, 1>

However, ISTM from the remaining IR that thanks to the casts, it will see the
right size if it got past the bit_and_expr.

Jakub, should we recognize bit_and_expr in objsz for gcc13?

Reply via email to