From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2140) id 59A883858C50; Tue, 20 Feb 2024 04:59:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59A883858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708405168; bh=fGMGKxFLn1E6QkyRRekFeZQMv5cI8P57KBE+XqW6qgM=; h=From:To:Subject:Date:From; b=gOwHD1Rr+ov5TLfQwF0rMiFjA2uUBYDYyZzLgp1w5RFsUldrAcxmnx/lwLJE3alNs GzUvRlKZKKXExUOq2eEwjT0ubLoIUuwqsqS7w+vqLKxcY75Z27NC5tvVnViIgU6Kfu dLf/5ZUDGDpQeTTlri0SARYteNdlb9hUhszXPnjk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Alexandre Oliva To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] pch: xfail g++.dg/pch/line-map-3.C X-Act-Checkin: gcc X-Git-Author: Alexandre Oliva X-Git-Refname: refs/users/aoliva/heads/testme X-Git-Oldrev: 36f6a47fa36d15f907e5356ac4b03378f5cbae5d X-Git-Newrev: 5347642cb8bd5e473a5e4de8e9a9e8f3ec773acd Message-Id: <20240220045928.59A883858C50@sourceware.org> Date: Tue, 20 Feb 2024 04:59:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:5347642cb8bd5e473a5e4de8e9a9e8f3ec773acd commit 5347642cb8bd5e473a5e4de8e9a9e8f3ec773acd Author: Alexandre Oliva Date: Tue Feb 20 01:58:35 2024 -0300 pch: xfail g++.dg/pch/line-map-3.C On riscv64-elf and riscv32-elf, the location_t values assigned to macro definitions in the command line and on line 1 end up past the end of the PCH include line after the PCH is loaded and the main file is reentered, so the existing xfails in the testcase, to cover messages that refer to line 2, fail to cover line 3, that the messages refer on riscv. This is already improved in the trunk, but the backports are probably too invasive, so this patch only adds xfails for line 3 as well. for gcc/testsuite/ChangeLog * g++.dg/pch/line-map-3.C: Xfail messages on line 3 too. Diff: --- gcc/testsuite/g++.dg/pch/line-map-3.C | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/g++.dg/pch/line-map-3.C b/gcc/testsuite/g++.dg/pch/line-map-3.C index 3390d7adba21..06ce4e4dbbb8 100644 --- a/gcc/testsuite/g++.dg/pch/line-map-3.C +++ b/gcc/testsuite/g++.dg/pch/line-map-3.C @@ -1,20 +1,22 @@ #define UNUSED_MACRO /* { dg-error "UNUSED_MACRO" "" { xfail *-*-* } } */ #include "line-map-3.H" /* { dg-bogus "-:UNUSED_MACRO" "" { xfail *-*-* } } */ +/* { dg-bogus "-:UNUSED_MACRO" "" { xfail *-*-* } } */ /* { dg-do compile } */ /* { dg-additional-options "-Werror=unused-macros" } */ /* PR preprocessor/105608 */ -/* This test case is currently xfailed and requires work in libcpp/pch.cc to - resolve. Currently, the macro location is incorrectly assigned to line 2 - of the header file when read via PCH, because libcpp doesn't try to - assign locations relative to the newly loaded line map after restoring - the PCH. */ +/* This test case is currently xfailed and requires work in + libcpp/pch.cc to resolve. Currently, the macro location is + incorrectly assigned to line 2 or 3 of the header file when read + via PCH, because libcpp doesn't try to assign locations relative to + the newly loaded line map after restoring the PCH. */ /* In PCH mode we also complain incorrectly about the command line macro -Dwith_PCH added by dejagnu; that warning would get suppressed if the macro location were correctly restored by libcpp to reflect that it was a command line macro. */ /* { dg-bogus "-:with_PCH" "" { xfail *-*-* } 2 } */ +/* { dg-bogus "-:with_PCH" "" { xfail *-*-* } 3 } */ /* The reason we used -Werror was to prevent pch.exp from rerunning without PCH; in that case we would get unnecessary XPASS outputs since the test does work