Re: [PATCH RFC] c++: Fix print-tree module handling for TEMPLATE_DECL

2021-04-05 Thread Nathan Sidwell
On 4/3/21 10:54 AM, Jason Merrill wrote: The if allows TEMPLATE_DECL, but then checking DECL_MODULE_IMPORT_P crashes on TEMPLATE_DECL. Fixed by stripping TEMPLATE_DECL first. Nathan, does this look right to you? gcc/cp/ChangeLog: * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P

[PATCH RFC] c++: Fix print-tree module handling for TEMPLATE_DECL

2021-04-03 Thread Jason Merrill via Gcc-patches
The if allows TEMPLATE_DECL, but then checking DECL_MODULE_IMPORT_P crashes on TEMPLATE_DECL. Fixed by stripping TEMPLATE_DECL first. Nathan, does this look right to you? gcc/cp/ChangeLog: * ptree.c (cxx_print_decl): Check DECL_MODULE_IMPORT_P on template result. ---