public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ PATCH to add a test for c++/81860
@ 2018-01-02 14:36 Marek Polacek
  2018-01-02 14:57 ` Nathan Sidwell
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Polacek @ 2018-01-02 14:36 UTC (permalink / raw)
  To: GCC Patches, Jason Merrill

This test exercising inheriting a template constructor in this PR got fixed with 
r251426.  As I don't see any lambdas here, I thought it worth to add it.

Tested on x86_64-linux, ok for trunk?

2018-01-02  Marek Polacek  <polacek@redhat.com>

	PR c++/81860
	* g++.dg/cpp0x/inh-ctor30.C: New test.

--- gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
+++ gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
@@ -0,0 +1,27 @@
+// PR c++/81860
+// { dg-do compile { target c++11 } }
+// { dg-final { scan-assembler "_ZN1AIjEC2Ev" } }
+
+template <typename T>
+struct A
+{
+  A() {}
+};
+
+struct B
+{
+  template <typename D>
+  B(D, const A<unsigned>& a = A<unsigned>()) : a(a) {}
+
+  A<unsigned> a;
+};
+
+struct C : B
+{
+  using B::B;
+};
+
+int main()
+{
+  C c(0);
+}

	Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C++ PATCH to add a test for c++/81860
  2018-01-02 14:36 C++ PATCH to add a test for c++/81860 Marek Polacek
@ 2018-01-02 14:57 ` Nathan Sidwell
  2018-01-08 16:11   ` Rainer Orth
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Sidwell @ 2018-01-02 14:57 UTC (permalink / raw)
  To: Marek Polacek, GCC Patches, Jason Merrill

On 01/02/2018 09:36 AM, Marek Polacek wrote:
> This test exercising inheriting a template constructor in this PR got fixed with
> r251426.  As I don't see any lambdas here, I thought it worth to add it.
> 
> Tested on x86_64-linux, ok for trunk?
> 
> 2018-01-02  Marek Polacek  <polacek@redhat.com>
> 
> 	PR c++/81860
> 	* g++.dg/cpp0x/inh-ctor30.C: New test.
> 

yes thanks


-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C++ PATCH to add a test for c++/81860
  2018-01-02 14:57 ` Nathan Sidwell
@ 2018-01-08 16:11   ` Rainer Orth
  2018-01-12  9:13     ` Rainer Orth
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2018-01-08 16:11 UTC (permalink / raw)
  To: Nathan Sidwell; +Cc: Marek Polacek, GCC Patches, Jason Merrill

Hi Nathan,

> On 01/02/2018 09:36 AM, Marek Polacek wrote:
>> This test exercising inheriting a template constructor in this PR got
>> fixed with
>> r251426.  As I don't see any lambdas here, I thought it worth to add it.
>>
>> Tested on x86_64-linux, ok for trunk?
>>
>> 2018-01-02  Marek Polacek  <polacek@redhat.com>
>>
>> 	PR c++/81860
>> 	* g++.dg/cpp0x/inh-ctor30.C: New test.
>>
>
> yes thanks

this test FAILs on a couple of targets: i386-pc-solaris2.1[01],
sparc-sun-solaris2.11, powerpc-ibm-aix7.2.0.0,
x86_64-apple-darwin15.6.0.

The former two have _ZN1AIjEC1Ev instead of _ZN1AIjEC2Ev which demangle
the same.  Should it accept both?

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C++ PATCH to add a test for c++/81860
  2018-01-08 16:11   ` Rainer Orth
@ 2018-01-12  9:13     ` Rainer Orth
  2018-01-12  9:59       ` Marek Polacek
  0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2018-01-12  9:13 UTC (permalink / raw)
  To: Nathan Sidwell; +Cc: Marek Polacek, GCC Patches, Jason Merrill

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

Hi Nathan,

>> On 01/02/2018 09:36 AM, Marek Polacek wrote:
>>> This test exercising inheriting a template constructor in this PR got
>>> fixed with
>>> r251426.  As I don't see any lambdas here, I thought it worth to add it.
>>>
>>> Tested on x86_64-linux, ok for trunk?
>>>
>>> 2018-01-02  Marek Polacek  <polacek@redhat.com>
>>>
>>> 	PR c++/81860
>>> 	* g++.dg/cpp0x/inh-ctor30.C: New test.
>>>
>>
>> yes thanks
>
> this test FAILs on a couple of targets: i386-pc-solaris2.1[01],
> sparc-sun-solaris2.11, powerpc-ibm-aix7.2.0.0,
> x86_64-apple-darwin15.6.0.
>
> The former two have _ZN1AIjEC1Ev instead of _ZN1AIjEC2Ev which demangle
> the same.  Should it accept both?

the following patch passed testing on i386-pc-solaris2.1[01] and
sparc-sun-solaris2.1[01].  Ok for mainline?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2018-01-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.dg/cpp0x/inh-ctor30.C: Allow for alternate mangled form.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-inh-ctor30.patch --]
[-- Type: text/x-patch, Size: 504 bytes --]

# HG changeset patch
# Parent  ad7853c94ad4b3bb2a66b5332a43d307005b138e
Fix g++.dg/cpp0x/inh-ctor30.C

diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
--- a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
@@ -1,6 +1,6 @@
 // PR c++/81860
 // { dg-do compile { target c++11 } }
-// { dg-final { scan-assembler "_ZN1AIjEC2Ev" } }
+// { dg-final { scan-assembler "_ZN1AIjEC\[12\]Ev" } }
 
 template <typename T>
 struct A

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: C++ PATCH to add a test for c++/81860
  2018-01-12  9:13     ` Rainer Orth
@ 2018-01-12  9:59       ` Marek Polacek
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Polacek @ 2018-01-12  9:59 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Nathan Sidwell, GCC Patches, Jason Merrill

On Fri, Jan 12, 2018 at 10:12:15AM +0100, Rainer Orth wrote:
> Hi Nathan,
> 
> >> On 01/02/2018 09:36 AM, Marek Polacek wrote:
> >>> This test exercising inheriting a template constructor in this PR got
> >>> fixed with
> >>> r251426.  As I don't see any lambdas here, I thought it worth to add it.
> >>>
> >>> Tested on x86_64-linux, ok for trunk?
> >>>
> >>> 2018-01-02  Marek Polacek  <polacek@redhat.com>
> >>>
> >>> 	PR c++/81860
> >>> 	* g++.dg/cpp0x/inh-ctor30.C: New test.
> >>>
> >>
> >> yes thanks
> >
> > this test FAILs on a couple of targets: i386-pc-solaris2.1[01],
> > sparc-sun-solaris2.11, powerpc-ibm-aix7.2.0.0,
> > x86_64-apple-darwin15.6.0.
> >
> > The former two have _ZN1AIjEC1Ev instead of _ZN1AIjEC2Ev which demangle
> > the same.  Should it accept both?

Sorry, I've been meaning to fix this.

> the following patch passed testing on i386-pc-solaris2.1[01] and
> sparc-sun-solaris2.1[01].  Ok for mainline?

This is the change I intended to do.  So I think just commit the patch,
thanks.

> 2018-01-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
> 
> 	* g++.dg/cpp0x/inh-ctor30.C: Allow for alternate mangled form.
> 

> # HG changeset patch
> # Parent  ad7853c94ad4b3bb2a66b5332a43d307005b138e
> Fix g++.dg/cpp0x/inh-ctor30.C
> 
> diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
> --- a/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
> +++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor30.C
> @@ -1,6 +1,6 @@
>  // PR c++/81860
>  // { dg-do compile { target c++11 } }
> -// { dg-final { scan-assembler "_ZN1AIjEC2Ev" } }
> +// { dg-final { scan-assembler "_ZN1AIjEC\[12\]Ev" } }
>  
>  template <typename T>
>  struct A


	Marek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-12  9:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 14:36 C++ PATCH to add a test for c++/81860 Marek Polacek
2018-01-02 14:57 ` Nathan Sidwell
2018-01-08 16:11   ` Rainer Orth
2018-01-12  9:13     ` Rainer Orth
2018-01-12  9:59       ` Marek Polacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).