diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-03-10 16:28:26 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-03-10 16:28:26 +0100 |
commit | cdd669f9fc6532b8f063e4e80ab0db6f78f95de9 (patch) | |
tree | fa7e54d820d0adfc8fd6251e2d35c5a321b4afd9 /gcc/cp/init.c | |
parent | 730e6e46344099be5deba0811e17d96c1179a2f5 (diff) | |
download | gcc-cdd669f9fc6532b8f063e4e80ab0db6f78f95de9.zip gcc-cdd669f9fc6532b8f063e4e80ab0db6f78f95de9.tar.gz gcc-cdd669f9fc6532b8f063e4e80ab0db6f78f95de9.tar.bz2 |
re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target)
PR c++/79896
* decl.c (finish_enum_value_list): If value is error_mark_node,
don't copy it and change its type.
* init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
of CONST_DECL is error_mark_node.
* g++.dg/ext/int128-5.C: New test.
From-SVN: r246034
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 18043e8..8bfcbde 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2162,7 +2162,8 @@ constant_value_1 (tree decl, bool strict_p, bool return_aggregate_cst_ok_p) init = DECL_INITIAL (decl); if (init == error_mark_node) { - if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) + if (TREE_CODE (decl) == CONST_DECL + || DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) /* Treat the error as a constant to avoid cascading errors on excessively recursive template instantiation (c++/9335). */ return init; |