aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 264258c..e70e674 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -6521,7 +6521,10 @@ resolves_to_fixed_type_p (tree instance, int* nonnull)
int cdtorp = 0;
tree fixed;
- if (processing_template_decl)
+ /* processing_template_decl can be false in a template if we're in
+ fold_non_dependent_expr, but we still want to suppress this check. */
+ if (current_function_decl
+ && uses_template_parms (current_function_decl))
{
/* In a template we only care about the type of the result. */
if (nonnull)