diff --git a/src/exprutil.c b/src/exprutil.c index db22dd4b7b..dc543f200a 100644 --- a/src/exprutil.c +++ b/src/exprutil.c @@ -33,6 +33,7 @@ exprutil.c -- Expression scanning utility routines. #include "lower_il.h" #endif /* DO_IL_LOWERING */ #include "statements.h" +#include "modules.h" #if USE_X86_FUNCTION_MULTIVERSIONING #include "sys_predef.h" #endif /* USE_X86_FUNCTION_MULTIVERSIONING */ @@ -18100,9 +18101,11 @@ reference entry, or is NULL if none is needed. tsym = prototype_template_if_template_symbol(tip->template_sym); if (tsym->defined) { could_be_instantiated = TRUE; + } else if (has_pending_template_definition_from_module( + routine->assoc_template)) { + could_be_instantiated = TRUE; } /* if */ - } else if (routine_sym->variant.routine.ptr - ->friend_defined_in_instantiation) { + } else if (routine->friend_defined_in_instantiation) { could_be_instantiated = TRUE; } /* if */ if (!could_be_instantiated) {