From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31263 invoked by alias); 8 Jun 2015 04:18:18 -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 31250 invoked by uid 89); 8 Jun 2015 04:18:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,KAM_ASCII_DIVIDERS,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; Mon, 08 Jun 2015 04:18:14 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 41D1E541439; Mon, 8 Jun 2015 06:18:11 +0200 (CEST) Date: Mon, 08 Jun 2015 04:52:00 -0000 From: Jan Hubicka To: rguenther@suse.de, gcc-patches@gcc.gnu.org Subject: Fix LTO streaming of BUILTINS_LOCATION Message-ID: <20150608041810.GB35779@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/msg00523.txt.bz2 Hi, currently we stream BUILTINS_LOCATION by expanding it and streaming resulting filename/line/col tripplet. That is a nonsense and breaks some logic that special case it. This patch fixes it by special casing it same way as we do UNKNOWN_LOCATION (we have precisely 2 special location codes, so doing compound bitpack is not needed) Bootstrapped/regtested ppc64le-linux, OK? Honza * lto-streamer-out.c (lto_output_location): Correctly stream BUILTINS_LOCATION * lto-streamer-in (lto_input_location): Likewise. Index: lto-streamer-out.c =================================================================== --- lto-streamer-out.c (revision 224201) +++ lto-streamer-out.c (working copy) @@ -205,6 +205,9 @@ bp_pack_value (bp, loc == UNKNOWN_LOCATION, 1); if (loc == UNKNOWN_LOCATION) return; + bp_pack_value (bp, loc == BUILTINS_LOCATION, 1); + if (loc == BUILTINS_LOCATION) + return; xloc = expand_location (loc); Index: lto-streamer-in.c =================================================================== --- lto-streamer-in.c (revision 224201) +++ lto-streamer-in.c (working copy) @@ -283,6 +283,11 @@ *loc = UNKNOWN_LOCATION; return; } + if (bp_unpack_value (bp, 1)) + { + *loc = BUILTINS_LOCATION; + return; + } *loc = BUILTINS_LOCATION + 1; file_change = bp_unpack_value (bp, 1);