Re: [PATCH] c++ modules: ICE with dynamic_cast [PR106304]

2022-10-14 Thread Nathan Sidwell via Gcc-patches
On 10/13/22 15:04, Patrick Palka wrote: The FUNCTION_DECL we build for __dynamic_cast has an empty DECL_CONTEXT, but trees_out::tree_node expects all FUNCTION_DECLs to have non-empty DECL_CONTEXT thus we crash when streaming out the dynamic_cast in the below testcase. This patch naively fixes th

[PATCH] c++ modules: ICE with dynamic_cast [PR106304]

2022-10-13 Thread Patrick Palka via Gcc-patches
The FUNCTION_DECL we build for __dynamic_cast has an empty DECL_CONTEXT, but trees_out::tree_node expects all FUNCTION_DECLs to have non-empty DECL_CONTEXT thus we crash when streaming out the dynamic_cast in the below testcase. This patch naively fixes this by setting DECL_CONTEXT for __dynamic_c