From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27733 invoked by alias); 11 Jun 2015 21:47:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 27724 invoked by uid 89); 11 Jun 2015 21:47:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_40,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 11 Jun 2015 21:47:46 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 6A4CD541032; Thu, 11 Jun 2015 23:47:43 +0200 (CEST) Date: Thu, 11 Jun 2015 21:49:00 -0000 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix verify_type ICE with -fshort-enum Message-ID: <20150611214743.GA59435@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-06/txt/msg00883.txt.bz2 Hi, gcc.c-torture/execute/930408-1.c currently ICE on -fshort-enum target(s) because TYPE_PACKED is not consistently set among type variants. Bootstrapped/regtested ppc64le-linux, OK? Honza PR middle-end/66325 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type variants. Index: c-decl.c =================================================================== --- c-decl.c (revision 224250) +++ c-decl.c (working copy) @@ -7946,7 +7946,8 @@ 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