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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldyh at gcc dot gnu.org

--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Andrew Macleod from comment #1)
> Hmm. I would have said we did, but i don't see it.
> 
> It would not be difficult to perform a global query if the stmt has no basic
> block set.   I would have sworn we did that  :-P
> 
> Maybe we decided it doesn't make sense to pass in a stmt for context that
> isn't in the IL?  there is no context in that case, so passing it in might
> be in error?
> 
> I'm OK wither way.. in range_of_expr, something like
> 
>   // If there is no statement, just get the global value.
> -  if (!stmt)
> +  if (!stmt || !gimple_bb (stmt))

Huh, I really thought we had checks for statements not in the IL elsewhere. 
The DOM threader definitely passes dummy statements to the path ranger.

There's also:

commit 4ac080e384cd30d37fac069d791b813100e6524a
Author: Andrew MacLeod <[email protected]>
Date:   Mon Jan 19 13:44:25 2026 -0500

    Do not trap on a stmt with no basic block.

    WHen calculating ranges for statements not in the IL, avoid looking for
    range on entry values.

            PR tree-optimization/123314


Sorry if I'm missing something obvious; I'm a little rusty here.

Reply via email to