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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Basically get_ref_base_and_extent trusts TYPE_SIZE of the array operand of an
ARRAY_REF (it would also use range info on an SSA name index, but we'd expect
a singleton to be propagated there already).  In principle that would be
a general "folding" trick we can apply to more consistently handle this
situation across passes.  gimplification might be the "nicest" place to
handle this, OTOH inlining / CCP might turn VLAs into [1] as well.

Reply via email to