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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I see add_function_candidate calling
2570                  t = implicit_conversion (parmtype, argtype, arg,
2571                                           /*c_cast_p=*/false, lflags,
complain);
where arg is
{NON_LVALUE_EXPR <1>, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, ..., 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, NON_LVALUE_EXPR <0>}
(i.e. CONSTRUCTOR with RAW_DATA_CST in it).
implicit_conversion returns ck_aggr where t->u.expr is a new CONSTRUCTOR with
the RAW_DATA_CST expanded into individual INTEGER_CSTs (it is
initializer_list<int> rather than say <char>), but that destructively modifies
the original arg, replacing the RAW_DATA_CST just with the first element in
there.  And somehow the t->u.expr isn't used but the old CONSTRUCTOR.

Reply via email to