https://gcc.gnu.org/g:9cf025c116ba0c93ae44cfd50a9035d4714880f0

commit r17-5595-g9cf025c116ba0c93ae44cfd50a9035d4714880f0
Author: John David Anglin <[email protected]>
Date:   Mon Oct 26 16:42:17 2026 -0400

    testsuite: Fix g++.dg/gomp/deprecate-1.C on hppa targets
    
    The g++.dg/gomp/deprecate-1.C test fails on hppa targets (such as
    hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu) because the leading '#'
    character is stripped from the diagnostic source line snippet.  On the
    PA-RISC (hppa) architecture, the # character is treated as an assembly
    comment delimiter or a special target-specific modifier.
    
    This patch fixes the failure without shifting absolute lines or
    duplicating output blocks by using a wildcard pattern '.*pragma' that
    handles both variants.  I tried using the regexp '[# ]' but that isn't
    supported.
    
    2026-10-26  John David Anglin  <[email protected]>
    
    gcc/testsuite/ChangeLog:
    
            * g++.dg/gomp/deprecate-1.C: Use a wildcard pattern in the
            multiline output verification to accommodate targets where
            the leading '#' character is missing from the diagnostic
            output.

Diff:
---
 gcc/testsuite/g++.dg/gomp/deprecate-1.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/gomp/deprecate-1.C 
b/gcc/testsuite/g++.dg/gomp/deprecate-1.C
index 37ff86a8daaf..425d2dc36eea 100644
--- a/gcc/testsuite/g++.dg/gomp/deprecate-1.C
+++ b/gcc/testsuite/g++.dg/gomp/deprecate-1.C
@@ -116,7 +116,7 @@ bar ()
   ;
   #pragma omp metadirective when (device={arch("blahblah")}: nothing) default 
(nothing)                /* { dg-warning "'default' clause on metadirectives 
deprecated since OpenMP 5.2, use 'otherwise'" } */
 /* { dg-begin-multiline-output "" }
-   #pragma omp metadirective when (device={arch("blahblah")}: nothing) default 
(nothing)
+   .*pragma omp metadirective when (device={arch("blahblah")}: nothing) 
default (nothing)
                                                                        ^~~~~~~
                                                                        
otherwise
    { dg-end-multiline-output "" } */

Reply via email to