[Bug tree-optimization/103989] [12 regression] std::optional and bogus -Wmaybe-unitialized at -Og since r12-1992-g6feb628a706e86eb
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 12 19:11:44 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103989
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> That IMHO bogus D.35417 = D.35181; statement comes from the inliner and it
> can be fixed easily:
>
> --- gcc/tree-inline.c.jj 2022-01-11 23:11:23.422275652 +0100
> +++ gcc/tree-inline.c 2022-01-12 18:37:44.119950128 +0100
> @@ -3608,7 +3608,7 @@ setup_one_parameter (copy_body_data *id,
> init_stmt = gimple_build_assign (def, rhs);
> }
> }
> - else
> + else if (!is_empty_type (TREE_TYPE (var)))
> init_stmt = gimple_build_assign (var, rhs);
We should do this patch no matter what, it will speed up the compiler I think
(there has been other issues in the past in ipa-modref even of handling such IR
too).
More information about the Gcc-bugs
mailing list