public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] pch: xfail g++.dg/pch/line-map-3.C
@ 2024-02-20  4:59 Alexandre Oliva
  0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2024-02-20  4:59 UTC (permalink / raw)
  To: gcc-cvs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-20  4:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20  4:59 [gcc(refs/users/aoliva/heads/testme)] pch: xfail g++.dg/pch/line-map-3.C Alexandre Oliva

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).