aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-04-13 14:32:11 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-04-13 14:32:11 -0400
commit0d9cdbdd7ab2b9245e05ca0155bdd43764499ed1 (patch)
treee1812eb505d19076a7fca56c2949f95b96ff7043 /gcc/cp
parent85115fb63266f4ae1979f2f5c4d79a7a2ff51a70 (diff)
downloadgcc-0d9cdbdd7ab2b9245e05ca0155bdd43764499ed1.zip
gcc-0d9cdbdd7ab2b9245e05ca0155bdd43764499ed1.tar.gz
gcc-0d9cdbdd7ab2b9245e05ca0155bdd43764499ed1.tar.bz2
re PR c++/70627 (internal compiler error: verify_type failed)
PR c++/70627 * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE. From-SVN: r234956
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8f1ae23..837a58c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/70627
+ * decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.
+
2016-04-13 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/70635
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 2ac5c4b..380bc79 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -13253,7 +13253,10 @@ start_enum (tree name, tree enumtype, tree underlying_type,
if (underlying_type)
{
- if (CP_INTEGRAL_TYPE_P (underlying_type))
+ if (ENUM_UNDERLYING_TYPE (enumtype))
+ /* We already checked that it matches, don't change it to a different
+ typedef variant. */;
+ else if (CP_INTEGRAL_TYPE_P (underlying_type))
{
copy_type_enum (enumtype, underlying_type);
ENUM_UNDERLYING_TYPE (enumtype) = underlying_type;