Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk?
-- >8 --
I hadn't retested r16-5727-g858f3007278337 on trunk before pushing and
I'd missed that it interacts badly with the assertion added by
r16-5305-gc38bf35f0c7fa1. This adjusts the assertion to not check
DECL_LOCAL_DECL_P functions (as they won't have import_export_decl
called on them anyway).
PR c++/119864
gcc/cp/ChangeLog:
* module.cc (trees_out::write_function_def): Don't crash on
DECL_LOCAL_DECL_P function definitions.
Signed-off-by: Nathaniel Shead <[email protected]>
---
gcc/cp/module.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index ea22cef24a5..993594fafc3 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -12935,6 +12935,7 @@ trees_out::write_function_def (tree decl)
/* Make sure DECL_REALLY_EXTERN and DECL_INTERFACE_KNOWN are consistent
on non-templates or we'll crash later in import_export_decl. */
gcc_checking_assert (flags || DECL_INTERFACE_KNOWN (decl)
+ || DECL_LOCAL_DECL_P (decl)
|| (DECL_LANG_SPECIFIC (decl)
&& DECL_TEMPLATE_INFO (decl)
&& uses_template_parms (DECL_TI_ARGS (decl))));
--
2.51.0