diff options
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fbd16e5b19c..c045353fe7f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5517,7 +5517,7 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, DECL_INITIAL (decl) = NULL_TREE; } - if (init && init_const_expr_p) + if (init && init_const_expr_p && TREE_CODE (decl) == VAR_DECL) { DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl) = 1; if (DECL_INTEGRAL_CONSTANT_VAR_P (decl)) |