public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] pch: xfail g++.dg/pch/line-map-3.C Date: Tue, 20 Feb 2024 04:59:28 +0000 (GMT) [thread overview] Message-ID: <20240220045928.59A883858C50@sourceware.org> (raw) https://gcc.gnu.org/g:5347642cb8bd5e473a5e4de8e9a9e8f3ec773acd commit 5347642cb8bd5e473a5e4de8e9a9e8f3ec773acd Author: Alexandre Oliva <oliva@adacore.com> 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
reply other threads:[~2024-02-20 4:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240220045928.59A883858C50@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).