On 2/27/19 4:22 PM, Marek Polacek wrote:
build_value_init doesn't work in templates (for non-scalar/array types,
anyway), so avoid this situation, much like in build_new_method_call_1.

We're calling convert_like_real because when there's only one non-viable
candidate function, build_new_function_call calls cp_build_function_call_vec
to give errors and that calls convert_arguments.  If there's a viable
candidate, build_new_function_call calls build_over_call instead, and that,
when in a template, doesn't process the arguments.

I ran the testsuite to see if we ever call build_value_init in a template
in convert_like_real and nothing turned up.

Bootstrapped/regtested on x86_64-linux, ok for trunk/8?

2019-02-27  Marek Polacek  <pola...@redhat.com>

        PR c++/88857 - ICE with value-initialization of argument in template.
        * call.c (convert_like_real): Don't call build_value_init in template.

OK.

Jason

Reply via email to