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

--- Comment #2 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 23 Jan 2025, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118628
> 
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jakub at gcc dot gnu.org,
>                    |                            |matz at gcc dot gnu.org,
>                    |                            |rguenth at gcc dot gnu.org
> 
> --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Seems it is like
>   tree offvar;
>   tree running_off;
>   if (!costing_p)
>     {
>       ... (..., &offvar, ...);
>     }
>   running_off = offvar;
>   for (...)
>     {
>       if (costing_p)
>         {
>           ...
>           continue;
>         }
>       use running_off;
>     }
> So, all wrong it does is that it is copying possibly uninitialized value
> unconditionally to something that will not be used unless it is initialized.
> Agreed we should either initialize offvar to NULL_TREE or rework in some other
> way.

I'd say zero-initialize it.

Reply via email to