From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7901 invoked by alias); 26 Nov 2014 08:51:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7881 invoked by uid 48); 26 Nov 2014 08:51:19 -0000 From: "enkovich.gnu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/64075] [5 Regression] ICE: in bp_pack_value, at data-streamer.h:106 Date: Wed, 26 Nov 2014 08:51:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: ice-on-valid-code, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: enkovich.gnu at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg03076.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64075 --- Comment #4 from Ilya Enkovich --- (In reply to H.J. Lu from comment #3) > It was caused by r217655. The problem was introduced earlier when function_code field in tree_function_decl was extended to 12 bits. LTO streamers were not fixed appropriately. r217655 increased BUILT_IN_COMPLEX_MUL_MIN value and put it out of 11 bits which revealed the problem. With this patch compiles OK: diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 99448dd..eb205ed 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -333,7 +333,7 @@ unpack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN) { DECL_FUNCTION_CODE (expr) = (enum built_in_function) bp_unpack_value (bp, - 11); + 12); if (DECL_BUILT_IN_CLASS (expr) == BUILT_IN_NORMAL && DECL_FUNCTION_CODE (expr) >= END_BUILTINS) fatal_error ("machine independent builtin code out of range"); diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index ad58b84..0d87cff 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -300,7 +300,7 @@ pack_ts_function_decl_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, DECL_PURE_P (expr), 1); bp_pack_value (bp, DECL_LOOPING_CONST_OR_PURE_P (expr), 1); if (DECL_BUILT_IN_CLASS (expr) != NOT_BUILT_IN) - bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 11); + bp_pack_value (bp, DECL_FUNCTION_CODE (expr), 12); }