Re: PING^2 [PATCH] testsuite: Windows paths use \ and not /

2022-11-21 Thread Torbjorn SVENSSON via Gcc-patches

Pushed after off-list approval from Jeff Law.

On 2022-11-17 17:44, Torbjorn SVENSSON via Gcc-patches wrote:

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604896.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-11-02 19:16, Torbjorn SVENSSON wrote:

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604312.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-10-25 17:15, Torbjörn SVENSSON wrote:

Without this patch, the following error is reported on Windows:

In file included from 
t:\build\arm-none-eabi\include\c++\11.3.1\string:54,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\locale_classes.h:40,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\ios_base.h:41,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\ios:42,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\ostream:38,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\iostream:39:
t:\build\arm-none-eabi\include\c++\11.3.1\bits\range_access.h:36:10: 
note: include 
't:\build\arm-none-eabi\include\c++\11.3.1\initializer_list' 
translated to import
arm-none-eabi-g++.exe: warning: 
.../gcc/testsuite/g++.dg/modules/pr99023_b.X: linker input file 
unused because linking not done
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a  dg-regexp 6 not found: 
"[^\n]*: note: include '[^\n]*/initializer_list' translated to import\n"


gcc/testsuite/ChangeLog:

* g++.dg/modules/pr99023_b.X: Match Windows paths too.

Co-Authored-By: Yvan ROUX 
Signed-off-by: Torbjörn SVENSSON 
---
  gcc/testsuite/g++.dg/modules/pr99023_b.X | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/pr99023_b.X 
b/gcc/testsuite/g++.dg/modules/pr99023_b.X

index 3d82f34868b..ca5f32e5bcc 100644
--- a/gcc/testsuite/g++.dg/modules/pr99023_b.X
+++ b/gcc/testsuite/g++.dg/modules/pr99023_b.X
@@ -3,5 +3,5 @@
  // { dg-prune-output {linker input file unused} }
-// { dg-regexp {[^\n]*: note: include '[^\n]*/initializer_list' 
translated to import\n} }
+// { dg-regexp {[^\n]*: note: include '[^\n]*[/\\]initializer_list' 
translated to import\n} }

  NO DO NOT COMPILE


PING^2 [PATCH] testsuite: Windows paths use \ and not /

2022-11-17 Thread Torbjorn SVENSSON via Gcc-patches

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604896.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-11-02 19:16, Torbjorn SVENSSON wrote:

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604312.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-10-25 17:15, Torbjörn SVENSSON wrote:

Without this patch, the following error is reported on Windows:

In file included from 
t:\build\arm-none-eabi\include\c++\11.3.1\string:54,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\locale_classes.h:40,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\ios_base.h:41,

   from t:\build\arm-none-eabi\include\c++\11.3.1\ios:42,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\ostream:38,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\iostream:39:
t:\build\arm-none-eabi\include\c++\11.3.1\bits\range_access.h:36:10: 
note: include 
't:\build\arm-none-eabi\include\c++\11.3.1\initializer_list' 
translated to import
arm-none-eabi-g++.exe: warning: 
.../gcc/testsuite/g++.dg/modules/pr99023_b.X: linker input file unused 
because linking not done
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a  dg-regexp 6 not found: 
"[^\n]*: note: include '[^\n]*/initializer_list' translated to import\n"


gcc/testsuite/ChangeLog:

* g++.dg/modules/pr99023_b.X: Match Windows paths too.

Co-Authored-By: Yvan ROUX 
Signed-off-by: Torbjörn SVENSSON 
---
  gcc/testsuite/g++.dg/modules/pr99023_b.X | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/pr99023_b.X 
b/gcc/testsuite/g++.dg/modules/pr99023_b.X

index 3d82f34868b..ca5f32e5bcc 100644
--- a/gcc/testsuite/g++.dg/modules/pr99023_b.X
+++ b/gcc/testsuite/g++.dg/modules/pr99023_b.X
@@ -3,5 +3,5 @@
  // { dg-prune-output {linker input file unused} }
-// { dg-regexp {[^\n]*: note: include '[^\n]*/initializer_list' 
translated to import\n} }
+// { dg-regexp {[^\n]*: note: include '[^\n]*[/\\]initializer_list' 
translated to import\n} }

  NO DO NOT COMPILE


PING^1 [PATCH] testsuite: Windows paths use \ and not /

2022-11-02 Thread Torbjorn SVENSSON via Gcc-patches

Hi,

Ping, https://gcc.gnu.org/pipermail/gcc-patches/2022-October/604312.html

Ok for trunk?

Kind regards,
Torbjörn

On 2022-10-25 17:15, Torbjörn SVENSSON wrote:

Without this patch, the following error is reported on Windows:

In file included from t:\build\arm-none-eabi\include\c++\11.3.1\string:54,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\locale_classes.h:40,
   from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\ios_base.h:41,
   from t:\build\arm-none-eabi\include\c++\11.3.1\ios:42,
   from t:\build\arm-none-eabi\include\c++\11.3.1\ostream:38,
   from t:\build\arm-none-eabi\include\c++\11.3.1\iostream:39:
t:\build\arm-none-eabi\include\c++\11.3.1\bits\range_access.h:36:10: note: 
include 't:\build\arm-none-eabi\include\c++\11.3.1\initializer_list' translated 
to import
arm-none-eabi-g++.exe: warning: .../gcc/testsuite/g++.dg/modules/pr99023_b.X: 
linker input file unused because linking not done
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a  dg-regexp 6 not found: "[^\n]*: note: 
include '[^\n]*/initializer_list' translated to import\n"

gcc/testsuite/ChangeLog:

* g++.dg/modules/pr99023_b.X: Match Windows paths too.

Co-Authored-By: Yvan ROUX 
Signed-off-by: Torbjörn SVENSSON 
---
  gcc/testsuite/g++.dg/modules/pr99023_b.X | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/pr99023_b.X 
b/gcc/testsuite/g++.dg/modules/pr99023_b.X
index 3d82f34868b..ca5f32e5bcc 100644
--- a/gcc/testsuite/g++.dg/modules/pr99023_b.X
+++ b/gcc/testsuite/g++.dg/modules/pr99023_b.X
@@ -3,5 +3,5 @@
  
  // { dg-prune-output {linker input file unused} }
  
-// { dg-regexp {[^\n]*: note: include '[^\n]*/initializer_list' translated to import\n} }

+// { dg-regexp {[^\n]*: note: include '[^\n]*[/\\]initializer_list' translated 
to import\n} }
  NO DO NOT COMPILE


[PATCH] testsuite: Windows paths use \ and not /

2022-10-25 Thread Torbjörn SVENSSON via Gcc-patches
Without this patch, the following error is reported on Windows:

In file included from t:\build\arm-none-eabi\include\c++\11.3.1\string:54,
  from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\locale_classes.h:40,
  from 
t:\build\arm-none-eabi\include\c++\11.3.1\bits\ios_base.h:41,
  from t:\build\arm-none-eabi\include\c++\11.3.1\ios:42,
  from t:\build\arm-none-eabi\include\c++\11.3.1\ostream:38,
  from t:\build\arm-none-eabi\include\c++\11.3.1\iostream:39:
t:\build\arm-none-eabi\include\c++\11.3.1\bits\range_access.h:36:10: note: 
include 't:\build\arm-none-eabi\include\c++\11.3.1\initializer_list' translated 
to import
arm-none-eabi-g++.exe: warning: .../gcc/testsuite/g++.dg/modules/pr99023_b.X: 
linker input file unused because linking not done
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a  dg-regexp 6 not found: "[^\n]*: 
note: include '[^\n]*/initializer_list' translated to import\n"

gcc/testsuite/ChangeLog:

* g++.dg/modules/pr99023_b.X: Match Windows paths too.

Co-Authored-By: Yvan ROUX 
Signed-off-by: Torbjörn SVENSSON 
---
 gcc/testsuite/g++.dg/modules/pr99023_b.X | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/pr99023_b.X 
b/gcc/testsuite/g++.dg/modules/pr99023_b.X
index 3d82f34868b..ca5f32e5bcc 100644
--- a/gcc/testsuite/g++.dg/modules/pr99023_b.X
+++ b/gcc/testsuite/g++.dg/modules/pr99023_b.X
@@ -3,5 +3,5 @@
 
 // { dg-prune-output {linker input file unused} }
 
-// { dg-regexp {[^\n]*: note: include '[^\n]*/initializer_list' translated to 
import\n} }
+// { dg-regexp {[^\n]*: note: include '[^\n]*[/\\]initializer_list' translated 
to import\n} }
 NO DO NOT COMPILE
-- 
2.25.1



Re: [PATCH] testsuite: Windows paths use \ and not /

2022-10-01 Thread Torbjorn SVENSSON via Gcc-patches

Hi,

I'm really sorry for the mess.
I did test my patch, but I just looked for the PASS/FAIL for the excess 
errors and missed that there was an error with the pattern.
In the end, the patch that you pushed is much better. Thanks for fixing 
the issue in my absence.


Kind regards,
Torbjörn

On 2022-09-30 23:07, Jonathan Wakely wrote:

On Fri, 30 Sept 2022 at 19:13, Jonathan Wakely via Libstdc++
 wrote:


On Fri, 30 Sept 2022 at 19:07, Jonathan Wakely  wrote:


On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely  wrote:


On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek  wrote:


On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches wrote:

On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:


On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
 wrote:


libstdc++-v3/testsuite:

 * 20_util/bind/ref_neg.cc: Prune Windows paths too.


Please CC the libstdc++ for libstdc++ patches.

OK for trunk, thanks.


I'm seeing errors now on x86_64-linux:

ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "

ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "


Bet it should be
// { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
or so.  Completely untested.


That fixes the error, but now the regex doesn't match so there are
still excess errors. It needs to be:

// { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }

Without any regex special characters, there's an implicit .* before
and after the pattern. But when you use any regex special characters
in the pattern, it stops working. I can't remember why. I figured it
out once.


It looks like just adding .* at the start is enough:

// { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):" }

But that's so ugly, I'm tempted to replace that prune with something different.


I'll finish testing this and push it.


I committed this instead, with no .* in the pattern.


Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:13, Jonathan Wakely via Libstdc++
 wrote:
>
> On Fri, 30 Sept 2022 at 19:07, Jonathan Wakely  wrote:
> >
> > On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely  wrote:
> > >
> > > On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek  wrote:
> > > >
> > > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via 
> > > > Gcc-patches wrote:
> > > > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
> > > > > >
> > > > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
> > > > > >  wrote:
> > > > > > >
> > > > > > > libstdc++-v3/testsuite:
> > > > > > >
> > > > > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
> > > > > >
> > > > > > Please CC the libstdc++ for libstdc++ patches.
> > > > > >
> > > > > > OK for trunk, thanks.
> > > > >
> > > > > I'm seeing errors now on x86_64-linux:
> > > > >
> > > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> > > > >
> > > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> > > >
> > > > Bet it should be
> > > > // { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
> > > > or so.  Completely untested.
> > >
> > > That fixes the error, but now the regex doesn't match so there are
> > > still excess errors. It needs to be:
> > >
> > > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }
> > >
> > > Without any regex special characters, there's an implicit .* before
> > > and after the pattern. But when you use any regex special characters
> > > in the pattern, it stops working. I can't remember why. I figured it
> > > out once.
> >
> > It looks like just adding .* at the start is enough:
> >
> > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):" }
> >
> > But that's so ugly, I'm tempted to replace that prune with something 
> > different.
>
> I'll finish testing this and push it.

I committed this instead, with no .* in the pattern.
commit 7069d03ba4ad6133225b89d433d9e86f0b0745b8
Author: Jonathan Wakely 
Date:   Fri Sep 30 19:10:29 2022

libstdc++: Fix broken dg-prune-output

The new pattern in the dg-prune-output directive doesn't work. Instead
of a messy regex full of leaning toothpicks, just match on the
diagnostic text instead of the header paths.

libstdc++-v3/ChangeLog:

* testsuite/20_util/bind/ref_neg.cc: Fix dg-prune-output
directive.

diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index 1e9f3e7fece..a78935775c2 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -50,7 +50,7 @@ void test02()
 
 // Ignore the reasons for deduction/substitution failure in the headers.
 // Arrange for the match to work on installed trees as well as build trees.
-// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
+// { dg-prune-output "no type named 'type' in 'struct std::result_of" }
 
 int main()
 {


Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Andreas Schwab
On Sep 30 2022, Jonathan Wakely via Gcc-patches wrote:

> That fixes the error, but now the regex doesn't match so there are
> still excess errors. It needs to be:
>
> // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }

In Tcl "." matches newlines, thus this will prune too much.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:07, Jonathan Wakely  wrote:
>
> On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely  wrote:
> >
> > On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek  wrote:
> > >
> > > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches 
> > > wrote:
> > > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
> > > > >
> > > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
> > > > >  wrote:
> > > > > >
> > > > > > libstdc++-v3/testsuite:
> > > > > >
> > > > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
> > > > >
> > > > > Please CC the libstdc++ for libstdc++ patches.
> > > > >
> > > > > OK for trunk, thanks.
> > > >
> > > > I'm seeing errors now on x86_64-linux:
> > > >
> > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> > > >
> > > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> > >
> > > Bet it should be
> > > // { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
> > > or so.  Completely untested.
> >
> > That fixes the error, but now the regex doesn't match so there are
> > still excess errors. It needs to be:
> >
> > // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }
> >
> > Without any regex special characters, there's an implicit .* before
> > and after the pattern. But when you use any regex special characters
> > in the pattern, it stops working. I can't remember why. I figured it
> > out once.
>
> It looks like just adding .* at the start is enough:
>
> // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):" }
>
> But that's so ugly, I'm tempted to replace that prune with something 
> different.

I'll finish testing this and push it.
commit 8d10c215fcf8425b4c514e1d10a15a6086aa8442
Author: Jonathan Wakely 
Date:   Fri Sep 30 19:10:29 2022

libstdc++: Fix broken dg-prune-output

The new pattern in the dg-prune-output directive doesn't work. Instead
of a messy regex full of leaning toothpicks, just match on the
diagnostic text instead of the header paths.

libstdc++-v3/ChangeLog:

* testsuite/20_util/bind/ref_neg.cc: Fix dg-prune-output
directive.

diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index 1e9f3e7fece..1d4b1b66c76 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -50,7 +50,7 @@ void test02()
 
 // Ignore the reasons for deduction/substitution failure in the headers.
 // Arrange for the match to work on installed trees as well as build trees.
-// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
+// { dg-prune-output "no type named 'type' in .*std::result_of" }
 
 int main()
 {


Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 19:04, Jonathan Wakely  wrote:
>
> On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek  wrote:
> >
> > On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches 
> > wrote:
> > > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
> > > >
> > > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
> > > >  wrote:
> > > > >
> > > > > libstdc++-v3/testsuite:
> > > > >
> > > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
> > > >
> > > > Please CC the libstdc++ for libstdc++ patches.
> > > >
> > > > OK for trunk, thanks.
> > >
> > > I'm seeing errors now on x86_64-linux:
> > >
> > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> > >
> > > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> >
> > Bet it should be
> > // { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
> > or so.  Completely untested.
>
> That fixes the error, but now the regex doesn't match so there are
> still excess errors. It needs to be:
>
> // { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }
>
> Without any regex special characters, there's an implicit .* before
> and after the pattern. But when you use any regex special characters
> in the pattern, it stops working. I can't remember why. I figured it
> out once.

It looks like just adding .* at the start is enough:

// { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):" }

But that's so ugly, I'm tempted to replace that prune with something different.



Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 18:55, Jakub Jelinek  wrote:
>
> On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches 
> wrote:
> > On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
> > >
> > > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
> > >  wrote:
> > > >
> > > > libstdc++-v3/testsuite:
> > > >
> > > > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
> > >
> > > Please CC the libstdc++ for libstdc++ patches.
> > >
> > > OK for trunk, thanks.
> >
> > I'm seeing errors now on x86_64-linux:
> >
> > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> >
> > ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> > dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
>
> Bet it should be
> // { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
> or so.  Completely untested.

That fixes the error, but now the regex doesn't match so there are
still excess errors. It needs to be:

// { dg-prune-output ".*\[/\\](functional|bits\[/\\]invoke.h):.*" }

Without any regex special characters, there's an implicit .* before
and after the pattern. But when you use any regex special characters
in the pattern, it stops working. I can't remember why. I figured it
out once.



Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 30, 2022 at 06:47:07PM +0100, Jonathan Wakely via Gcc-patches wrote:
> On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
> >
> > On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
> >  wrote:
> > >
> > > libstdc++-v3/testsuite:
> > >
> > > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
> >
> > Please CC the libstdc++ for libstdc++ patches.
> >
> > OK for trunk, thanks.
> 
> I'm seeing errors now on x86_64-linux:
> 
> ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "
> 
> ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
> dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "

Bet it should be
// { dg-prune-output "\[/\\](functional|bits\[/\\]invoke.h):" }
or so.  Completely untested.

> > > Co-Authored-By: Yvan ROUX  
> > > Signed-off-by: Torbjörn SVENSSON  
> > > ---
> > >  libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
> > > b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > > index e779d2f20bd..1e9f3e7fece 100644
> > > --- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > > +++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > > @@ -50,7 +50,7 @@ void test02()
> > >
> > >  // Ignore the reasons for deduction/substitution failure in the headers.
> > >  // Arrange for the match to work on installed trees as well as build 
> > > trees.
> > > -// { dg-prune-output "/(functional|bits/invoke.h):" }
> > > +// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
> > >
> > >  int main()
> > >  {
> > > --
> > > 2.25.1
> > >

Jakub



Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 17:26, Jonathan Wakely wrote:
>
> On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
>  wrote:
> >
> > libstdc++-v3/testsuite:
> >
> > * 20_util/bind/ref_neg.cc: Prune Windows paths too.
>
> Please CC the libstdc++ for libstdc++ patches.
>
> OK for trunk, thanks.

I'm seeing errors now on x86_64-linux:

ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "

ERROR: 20_util/bind/ref_neg.cc: unknown dg option: /\\ for "
dg-prune-output 53 "[/\\](functional|bits/invoke.h):" "





>
>
> >
> > Co-Authored-By: Yvan ROUX  
> > Signed-off-by: Torbjörn SVENSSON  
> > ---
> >  libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
> > b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > index e779d2f20bd..1e9f3e7fece 100644
> > --- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > +++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> > @@ -50,7 +50,7 @@ void test02()
> >
> >  // Ignore the reasons for deduction/substitution failure in the headers.
> >  // Arrange for the match to work on installed trees as well as build trees.
> > -// { dg-prune-output "/(functional|bits/invoke.h):" }
> > +// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
> >
> >  int main()
> >  {
> > --
> > 2.25.1
> >



Re: [PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Jonathan Wakely via Gcc-patches
On Fri, 30 Sept 2022 at 17:04, Torbjörn SVENSSON
 wrote:
>
> libstdc++-v3/testsuite:
>
> * 20_util/bind/ref_neg.cc: Prune Windows paths too.

Please CC the libstdc++ for libstdc++ patches.

OK for trunk, thanks.


>
> Co-Authored-By: Yvan ROUX  
> Signed-off-by: Torbjörn SVENSSON  
> ---
>  libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
> b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> index e779d2f20bd..1e9f3e7fece 100644
> --- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> +++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
> @@ -50,7 +50,7 @@ void test02()
>
>  // Ignore the reasons for deduction/substitution failure in the headers.
>  // Arrange for the match to work on installed trees as well as build trees.
> -// { dg-prune-output "/(functional|bits/invoke.h):" }
> +// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
>
>  int main()
>  {
> --
> 2.25.1
>



[PATCH] testsuite: Windows paths use \ and not /

2022-09-30 Thread Torbjörn SVENSSON via Gcc-patches
libstdc++-v3/testsuite:

* 20_util/bind/ref_neg.cc: Prune Windows paths too.

Co-Authored-By: Yvan ROUX  
Signed-off-by: Torbjörn SVENSSON  
---
 libstdc++-v3/testsuite/20_util/bind/ref_neg.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc 
b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
index e779d2f20bd..1e9f3e7fece 100644
--- a/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
+++ b/libstdc++-v3/testsuite/20_util/bind/ref_neg.cc
@@ -50,7 +50,7 @@ void test02()
 
 // Ignore the reasons for deduction/substitution failure in the headers.
 // Arrange for the match to work on installed trees as well as build trees.
-// { dg-prune-output "/(functional|bits/invoke.h):" }
+// { dg-prune-output "[/\\](functional|bits/invoke.h):" }
 
 int main()
 {
-- 
2.25.1