aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 97a9294..f2b4c8e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -19526,6 +19526,11 @@ value_dependent_expression_p (tree expression)
return false;
}
+ case STMT_EXPR:
+ /* Treat a GNU statement expression as dependent to avoid crashing
+ under fold_non_dependent_expr; it can't be constant. */
+ return true;
+
default:
/* A constant expression is value-dependent if any subexpression is
value-dependent. */