RFA: Fix libiberty testsuite failure

Message ID 87y2u28b5g.fsf@redhat.com
State New
Headers show
Series
  • RFA: Fix libiberty testsuite failure
Related show

Commit Message

Nick Clifton Jan. 20, 2020, 2:17 p.m.
Hi Ian,

  The libiberty testsuite in the gcc mainline is currently failing on
  the last test:

    FAIL at line 1452, options :
    in:  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE
    out: void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)
    exp: void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))), void>::type*)

  To me it looks like the expected demangling is incorrect - it wants a
  double set of parentheses around decltype(nullptr) when I think that
  only one is needed.  So I would like to apply the patch below to fix
  this.

  Is this OK ?

Cheers
  Nick

libiberty/ChangeLog
2020-01-20  Nick Clifton  <nickc@redhat.com>

	* testsuite/demangle-expected: Fix expected demangling.

Comments

Ian Lance Taylor Jan. 20, 2020, 3:58 p.m. | #1
Nick Clifton <nickc@redhat.com> writes:

> Hi Ian,

>

>   The libiberty testsuite in the gcc mainline is currently failing on

>   the last test:

>

>     FAIL at line 1452, options :

>     in:  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

>     out: void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)

>     exp: void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))), void>::type*)

>

>   To me it looks like the expected demangling is incorrect - it wants a

>   double set of parentheses around decltype(nullptr) when I think that

>   only one is needed.  So I would like to apply the patch below to fix

>   this.

>

>   Is this OK ?


Looks like this problem was introduced by

2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>

        * cp-demangle.c (d_expr_primary): Handle
        nullptr demangling.
        * testsuite/demangle-expected: Added test.

https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00064.html

Kamlesh, Jason, can you confirm that Nick's change to the testsuite is
testing the expected demangling, and that the current entry in the
testsuite is incorrect?  Thanks.

Ian


> libiberty/ChangeLog

> 2020-01-20  Nick Clifton  <nickc@redhat.com>

>

> 	* testsuite/demangle-expected: Fix expected demangling.

>

> Index: libiberty/testsuite/demangle-expected

> ===================================================================

> --- libiberty/testsuite/demangle-expected	(revision 280157)

> +++ libiberty/testsuite/demangle-expected	(working copy)

> @@ -1449,4 +1449,4 @@

>  #PR91979 demangling nullptr expression

>  

>  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

> -void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))), void>::type*)

> +void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)
kamlesh kumar Jan. 20, 2020, 4:58 p.m. | #2
yes, current expected entry is wrong and
Nick's patch corrects that.

./kamlesh


On Mon, Jan 20, 2020 at 9:29 PM Ian Lance Taylor <ian@airs.com> wrote:

> Nick Clifton <nickc@redhat.com> writes:

>

> > Hi Ian,

> >

> >   The libiberty testsuite in the gcc mainline is currently failing on

> >   the last test:

> >

> >     FAIL at line 1452, options :

> >     in:  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

> >     out: void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)),

> void>::type*)

> >     exp: void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))),

> void>::type*)

> >

> >   To me it looks like the expected demangling is incorrect - it wants a

> >   double set of parentheses around decltype(nullptr) when I think that

> >   only one is needed.  So I would like to apply the patch below to fix

> >   this.

> >

> >   Is this OK ?

>

> Looks like this problem was introduced by

>

> 2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>

>

>         * cp-demangle.c (d_expr_primary): Handle

>         nullptr demangling.

>         * testsuite/demangle-expected: Added test.

>

> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00064.html

>

> Kamlesh, Jason, can you confirm that Nick's change to the testsuite is

> testing the expected demangling, and that the current entry in the

> testsuite is incorrect?  Thanks.

>

> Ian

>

>

> > libiberty/ChangeLog

> > 2020-01-20  Nick Clifton  <nickc@redhat.com>

> >

> >       * testsuite/demangle-expected: Fix expected demangling.

> >

> > Index: libiberty/testsuite/demangle-expected

> > ===================================================================

> > --- libiberty/testsuite/demangle-expected     (revision 280157)

> > +++ libiberty/testsuite/demangle-expected     (working copy)

> > @@ -1449,4 +1449,4 @@

> >  #PR91979 demangling nullptr expression

> >

> >  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

> > -void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))),

> void>::type*)

> > +void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)),

> void>::type*)

>
Ian Lance Taylor Jan. 20, 2020, 5:52 p.m. | #3
kamlesh kumar <kamleshbhalui@gmail.com> writes:

> yes, current expected entry is wrong and

> Nick's patch corrects that.


Thanks.  Nick, the patch is OK.

Ian

> On Mon, Jan 20, 2020 at 9:29 PM Ian Lance Taylor <ian@airs.com> wrote:

>

>> Nick Clifton <nickc@redhat.com> writes:

>>

>> > Hi Ian,

>> >

>> >   The libiberty testsuite in the gcc mainline is currently failing on

>> >   the last test:

>> >

>> >     FAIL at line 1452, options :

>> >     in:  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

>> >     out: void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)),

>> void>::type*)

>> >     exp: void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))),

>> void>::type*)

>> >

>> >   To me it looks like the expected demangling is incorrect - it wants a

>> >   double set of parentheses around decltype(nullptr) when I think that

>> >   only one is needed.  So I would like to apply the patch below to fix

>> >   this.

>> >

>> >   Is this OK ?

>>

>> Looks like this problem was introduced by

>>

>> 2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>

>>

>>         * cp-demangle.c (d_expr_primary): Handle

>>         nullptr demangling.

>>         * testsuite/demangle-expected: Added test.

>>

>> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00064.html

>>

>> Kamlesh, Jason, can you confirm that Nick's change to the testsuite is

>> testing the expected demangling, and that the current entry in the

>> testsuite is incorrect?  Thanks.

>>

>> Ian

>>

>>

>> > libiberty/ChangeLog

>> > 2020-01-20  Nick Clifton  <nickc@redhat.com>

>> >

>> >       * testsuite/demangle-expected: Fix expected demangling.

>> >

>> > Index: libiberty/testsuite/demangle-expected

>> > ===================================================================

>> > --- libiberty/testsuite/demangle-expected     (revision 280157)

>> > +++ libiberty/testsuite/demangle-expected     (working copy)

>> > @@ -1449,4 +1449,4 @@

>> >  #PR91979 demangling nullptr expression

>> >

>> >  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

>> > -void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))),

>> void>::type*)

>> > +void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)),

>> void>::type*)

>>
H.J. Lu March 2, 2020, 11:53 a.m. | #4
On Mon, Jan 20, 2020 at 9:53 AM Ian Lance Taylor <ian@airs.com> wrote:
>

> kamlesh kumar <kamleshbhalui@gmail.com> writes:

>

> > yes, current expected entry is wrong and

> > Nick's patch corrects that.

>

> Thanks.  Nick, the patch is OK.

>

> Ian


> >> > libiberty/ChangeLog

> >> > 2020-01-20  Nick Clifton  <nickc@redhat.com>

> >> >

> >> >       * testsuite/demangle-expected: Fix expected demangling.

> >> >

> >> > Index: libiberty/testsuite/demangle-expected

> >> > ===================================================================

> >> > --- libiberty/testsuite/demangle-expected     (revision 280157)

> >> > +++ libiberty/testsuite/demangle-expected     (working copy)

> >> > @@ -1449,4 +1449,4 @@

> >> >  #PR91979 demangling nullptr expression

> >> >

> >> >  _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE

> >> > -void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))),

> >> void>::type*)

> >> > +void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)),

> >> void>::type*)

> >>


I checked in the patch for Nick.

-- 
H.J.
From 3bb6abbf4bb98e58663ec6c9bc77ae0bdbac6e41 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Mon, 2 Mar 2020 03:50:34 -0800
Subject: [PATCH] Fix a libiberty testsuite failure

	* testsuite/demangle-expected: Update expected demangling of
	enable_if pattern.
---
 libiberty/ChangeLog                   | 5 +++++
 libiberty/testsuite/demangle-expected | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 91ae004005f..4c8b236cf78 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-02  Nick Clifton  <nickc@redhat.com>
+
+	* testsuite/demangle-expected: Update expected demangling of
+	enable_if pattern.
+
 2020-03-02  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR lto/93966
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index daffe782112..ccadf84e608 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -1449,7 +1449,7 @@ Foo<int>()::{lambda(auto:1)#1}::operator()<char>(char) const::X::fn
 #PR91979 demangling nullptr expression
 
 _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE
-void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))), void>::type*)
+void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)
 
 _ZNK5coro15emptyawEv
 coro1::empty::operator co_await() const

Patch

Index: libiberty/testsuite/demangle-expected
===================================================================
--- libiberty/testsuite/demangle-expected	(revision 280157)
+++ libiberty/testsuite/demangle-expected	(working copy)
@@ -1449,4 +1449,4 @@ 
 #PR91979 demangling nullptr expression
 
 _Z3fooILPv0EEvPN9enable_ifIXeqT_LDnEEvE4typeE
-void foo<(void*)0>(enable_if<((void*)0)==((decltype(nullptr))), void>::type*)
+void foo<(void*)0>(enable_if<((void*)0)==(decltype(nullptr)), void>::type*)