Bah, this doesn't work. Reverted. Dave
On 2026-10-26 4:45 p.m., John David Anglin wrote: > Tested on hppa64-hp-hpux11.11. Committed to trunk. > > Dave > --- > > 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 --git a/gcc/testsuite/g++.dg/gomp/deprecate-1.C > b/gcc/testsuite/g++.dg/gomp/deprecate-1.C > index 37ff86a8daa..425d2dc36ee 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 "" } */ -- John David Anglin [email protected]
