https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79077
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, the problem is that we set CALL_FROM_THUNK_P: 378 if (current_function_decl && decl 379 && flag_new_inheriting_ctors 380 && DECL_INHERITED_CTOR (current_function_decl) 381 && (DECL_INHERITED_CTOR (current_function_decl) 382 == DECL_CLONED_FUNCTION (decl))) 383 /* Pass arguments directly to the inherited constructor. */ 384 CALL_FROM_THUNK_P (function) = true; on the Service::Service call in extends:extends inherited ctor, where the second argument of current_function_decl is: parm_decl 0x7fffefc50500 D.2359 type <record_type 0x7fffefc2bc78 xstring> and the second argument of decl is: parm_decl 0x7fffefc41980 name type <reference_type 0x7fffefc45a80> The CALL_FROM_THUNK_P then prevents cp_genericize_r from actually transforming the D.2359 parameter to *D.2359 that is needed after cp_genericize turned the nameless D.2359 parameter into is_invisiref_parm. I have no idea why call.c:384 sets the CALL_FROM_THUNK_P (is that for the case that it can be called also when the DECL_INHERITED_CTOR (current_function_decl) has invisiref parms replaced?