From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 529C4394800A for ; Mon, 19 Apr 2021 08:10:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 529C4394800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rguenther@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 41545AFCF; Mon, 19 Apr 2021 08:10:35 +0000 (UTC) Date: Mon, 19 Apr 2021 10:10:34 +0200 (CEST) From: Richard Biener Sender: rguenther@ryzen.fritz.box To: gcc-patches@gcc.gnu.org cc: jakub@redhat.com, nathan@acm.org Subject: [PATCH] preprocessor/100142 - revert unwanted change in last commit Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 08:10:46 -0000 This reverts a s/column_offset/column/ change in the fix for PR99446. Boostrapped on x86_64-unknown-linux-gnu, testing in progress. OK for trunk? Thanks, Richard. 2021-04-19 Richard Biener PR preprocessor/100142 libcpp/ * line-map.c (linemap_position_for_loc_and_offset): Revert unintended s/column_offset/column/ change. * gcc.dg/pr100142.c: New testcase. --- libcpp/line-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 2f5e44447d2..a03d6760a8e 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -982,7 +982,7 @@ linemap_position_for_loc_and_offset (line_maps *set, the next line map of the set. Otherwise, we try to encode the location in the next map. */ for (; map != LINEMAPS_LAST_ORDINARY_MAP (set) - && (loc + (column << map->m_range_bits) + && (loc + (column_offset << map->m_range_bits) >= MAP_START_LOCATION (map + 1)); map++) /* If the next map is a different file, or starts in a higher line, we cannot encode the location there. */ -- 2.26.2