https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100716
--- Comment #1 from Matthias Kretz (Vir) <kretz at kde dot org> --- With -fno-pretty-templates both test cases do print the <U> template_parms. That's because in dump_function_decl, without flag_pretty_templates, t isn't generalized and thus is not considered a primary template. And dump_template_parms only returns early if primary is true.