https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97456
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> --- And indeed the following avoids the issue: diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 2e54bbb917c..71ad7c18523 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -570,8 +570,10 @@ set_component_ssa_name (tree ssa_name, bool imag_p, tree value) /* Replace an anonymous base value with the variable from cvc_lookup. This should result in better debug info. */ if (SSA_NAME_VAR (ssa_name) - && (!SSA_NAME_VAR (value) || DECL_IGNORED_P (SSA_NAME_VAR (value))) - && !DECL_IGNORED_P (SSA_NAME_VAR (ssa_name))) + && !DECL_IGNORED_P (SSA_NAME_VAR (ssa_name)) + && (!SSA_NAME_VAR (value) + || (DECL_IGNORED_P (SSA_NAME_VAR (value)) + && !SSA_NAME_IS_DEFAULT_DEF (value)))) { comp = get_component_var (SSA_NAME_VAR (ssa_name), imag_p); replace_ssa_name_symbol (value, comp);