From 8cbababc58a439bc8927fe14b9b7f8e065fce00d Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 14 Jun 2015 09:05:03 +0200 Subject: [PATCH] re PR middle-end/66325 (ICE in gcc.c-torture/execute/930408-1.c, verify_type fails with --enable-checking=yes on arm-none-eabi) PR middle-end/66325 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type variants. From-SVN: r224463 --- gcc/c/ChangeLog | 6 ++++++ gcc/c/c-decl.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index af83cd24fce..ae9f862fe30 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2015-06-11 Jan Hubicka + + PR middle-end/66325 + * c-decl.c (start_enum): Set TYPE_PACKED consistently among type + variants. + 2015-06-11 Pierre-Marie de Rodat * c-decl.c (pop_scope): Register the main translation unit diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 3fde22fba94..b124feb37d6 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -7947,7 +7947,8 @@ start_enum (location_t loc, struct c_enum_contents *the_enum, tree name) the_enum->enum_overflow = 0; if (flag_short_enums) - TYPE_PACKED (enumtype) = 1; + for (tree v = TYPE_MAIN_VARIANT (enumtype); v; v = TYPE_NEXT_VARIANT (v)) + TYPE_PACKED (v) = 1; /* FIXME: This will issue a warning for a use of a type defined within sizeof in a statement expr. This is not terribly serious -- 2.30.2