[1/2] libstdc++: Fix pretty printer tests of tuple indexes

Message ID 20220904184735.177348-1-fent@in.tum.de
State New, archived
Headers
Series [1/2] libstdc++: Fix pretty printer tests of tuple indexes |

Commit Message

Philipp Fent Sept. 4, 2022, 6:47 p.m. UTC
  Signed-off-by: Philipp Fent <fent@in.tum.de>
---
 libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc | 2 +-
 libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Will Hawkins Sept. 6, 2022, 1:06 a.m. UTC | #1
Confirming that patch 1 of 2 *does* fix the failing tests here (x86-64).

Will

PS: Please tell me if emails like this are helpful or not. Just trying to help!

On Sun, Sep 4, 2022 at 2:48 PM Philipp Fent via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> Signed-off-by: Philipp Fent <fent@in.tum.de>
> ---
>  libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc | 2 +-
>  libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> index cc91803e247..af335d0d3c7 100644
> --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> @@ -29,7 +29,7 @@ main()
>  // { dg-final { note-test t1 {empty std::tuple} } }
>
>    std::tuple<std::string, int, std::tuple<>> t2{ "Johnny", 5, {} };
> -// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = empty std::tuple}} } }
> +// { dg-final { regexp-test t2 {std::tuple containing = {\[0\] = "Johnny", \[1\] = 5, \[2\] = empty std::tuple}} } }
>
>    std::cout << "\n";
>    return 0; // Mark SPOT
> diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> index f97640a0189..bc5978ee69d 100644
> --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> @@ -166,9 +166,9 @@ main()
>  // { dg-final { note-test runiq_ptr {std::unique_ptr<int> = {get() = 0x0}} } }
>
>    ExTuple tpl(6,7);
> -// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
> +// { dg-final { note-test tpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
>    ExTuple &rtpl = tpl;
> -// { dg-final { note-test rtpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
> +// { dg-final { note-test rtpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
>
>    std::error_code e0;
>    // { dg-final { note-test e0 {std::error_code = { }} } }
> --
> 2.37.3
>
  
Jonathan Wakely Sept. 6, 2022, 11:12 a.m. UTC | #2
On Tue, 6 Sept 2022 at 02:07, Will Hawkins <hawkinsw@obs.cr> wrote:
>
> Confirming that patch 1 of 2 *does* fix the failing tests here (x86-64).
>
> Will
>
> PS: Please tell me if emails like this are helpful or not. Just trying to help!

Thanks. I wasn't even seeing the failing tests, due to errors from GDB:

Dwarf Error: wrong version in compilation unit header (is 5, should be
2, 3, or 4) [in module
/home/jwakely/build/powerpc64le-unknown-linux-gnu/lib
stdc++-v3/testsuite/cxx11.exe

This meant they were UNSUPPORTED on my test machine.

I've pushed Philipp's [PATCH 1/2] now. Thank you both.


>
> On Sun, Sep 4, 2022 at 2:48 PM Philipp Fent via Libstdc++
> <libstdc++@gcc.gnu.org> wrote:
> >
> > Signed-off-by: Philipp Fent <fent@in.tum.de>
> > ---
> >  libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc | 2 +-
> >  libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> > index cc91803e247..af335d0d3c7 100644
> > --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> > +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
> > @@ -29,7 +29,7 @@ main()
> >  // { dg-final { note-test t1 {empty std::tuple} } }
> >
> >    std::tuple<std::string, int, std::tuple<>> t2{ "Johnny", 5, {} };
> > -// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = empty std::tuple}} } }
> > +// { dg-final { regexp-test t2 {std::tuple containing = {\[0\] = "Johnny", \[1\] = 5, \[2\] = empty std::tuple}} } }
> >
> >    std::cout << "\n";
> >    return 0; // Mark SPOT
> > diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> > index f97640a0189..bc5978ee69d 100644
> > --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> > +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
> > @@ -166,9 +166,9 @@ main()
> >  // { dg-final { note-test runiq_ptr {std::unique_ptr<int> = {get() = 0x0}} } }
> >
> >    ExTuple tpl(6,7);
> > -// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
> > +// { dg-final { note-test tpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
> >    ExTuple &rtpl = tpl;
> > -// { dg-final { note-test rtpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
> > +// { dg-final { note-test rtpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
> >
> >    std::error_code e0;
> >    // { dg-final { note-test e0 {std::error_code = { }} } }
> > --
> > 2.37.3
> >
>
  

Patch

diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
index cc91803e247..af335d0d3c7 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/48362.cc
@@ -29,7 +29,7 @@  main()
 // { dg-final { note-test t1 {empty std::tuple} } }
 
   std::tuple<std::string, int, std::tuple<>> t2{ "Johnny", 5, {} };
-// { dg-final { regexp-test t2 {std::tuple containing = {\[1\] = "Johnny", \[2\] = 5, \[3\] = empty std::tuple}} } }
+// { dg-final { regexp-test t2 {std::tuple containing = {\[0\] = "Johnny", \[1\] = 5, \[2\] = empty std::tuple}} } }
 
   std::cout << "\n";
   return 0; // Mark SPOT
diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
index f97640a0189..bc5978ee69d 100644
--- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
+++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx11.cc
@@ -166,9 +166,9 @@  main()
 // { dg-final { note-test runiq_ptr {std::unique_ptr<int> = {get() = 0x0}} } }
 
   ExTuple tpl(6,7);
-// { dg-final { note-test tpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
+// { dg-final { note-test tpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
   ExTuple &rtpl = tpl;
-// { dg-final { note-test rtpl {std::tuple containing = {[1] = 6, [2] = 7}} } }
+// { dg-final { note-test rtpl {std::tuple containing = {[0] = 6, [1] = 7}} } }
 
   std::error_code e0;
   // { dg-final { note-test e0 {std::error_code = { }} } }