diff options
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 1b3f039cc6d..30bafa07db1 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -14333,11 +14333,9 @@ tsubst_copy_and_build (tree t, case TARGET_EXPR: /* We can get here for a constant initializer of non-dependent type. FIXME stop folding in cp_parser_initializer_clause. */ - gcc_assert (TREE_CONSTANT (t)); { tree r = get_target_expr_sfinae (RECUR (TARGET_EXPR_INITIAL (t)), complain); - TREE_CONSTANT (r) = true; RETURN (r); } @@ -14421,6 +14419,9 @@ check_instantiated_arg (tree tmpl, tree t, tsubst_flags_t complain) return true; } } + /* Class template and alias template arguments should be OK. */ + else if (DECL_TYPE_TEMPLATE_P (t)) + ; /* A non-type argument of integral or enumerated type must be a constant. */ else if (TREE_TYPE (t) |