From d0332e3701009ca08109e8d1740608a2adc50054 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 30 May 2017 10:15:55 +0200 Subject: [PATCH] backport: re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target) Backported from mainline 2017-03-10 Jakub Jelinek 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: r248660 --- gcc/testsuite/g++.dg/ext/int128-5.C | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/int128-5.C diff --git a/gcc/testsuite/g++.dg/ext/int128-5.C b/gcc/testsuite/g++.dg/ext/int128-5.C new file mode 100644 index 000000000000..c2d9297c2cfb --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/int128-5.C @@ -0,0 +1,10 @@ +// PR c++/79896 +// { dg-do compile { target { ilp32 && { ! int128 } } } } +// { dg-options "" } + +enum E +{ + e1 = 0xffffffffffffffffULL, + e2, // { dg-error "overflow in enumeration values" } + e3 +} e = e3; -- 2.47.3