[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2013-05-03 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||ali.rostai at gmail dot com



--- Comment #16 from Paolo Carlini paolo.carlini at oracle dot com 2013-05-03 
09:06:07 UTC ---

*** Bug 57152 has been marked as a duplicate of this bug. ***


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-12-05 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 CC||mattipee at yahoo dot co.uk



--- Comment #15 from Paolo Carlini paolo.carlini at oracle dot com 2012-12-05 
13:05:34 UTC ---

*** Bug 53026 has been marked as a duplicate of this bug. ***


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-11-15 Thread dodji at seketeli dot org

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466

--- Comment #14 from dodji at seketeli dot org dodji at seketeli dot org 
2012-11-15 13:52:18 UTC ---
mattyclarkson at gmail dot com gcc-bugzi...@gcc.gnu.org a écrit:

 @Dodji, thanks for fixing this :)

You are welcome.  Sorry for the delay.

  What release will this be in? 4.8.1?

As Jon said, 4.8.0.

Cheers.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-11-14 Thread mattyclarkson at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #12 from Matt Clarkson mattyclarkson at gmail dot com 2012-11-14 
14:24:11 UTC ---

@Dodji, thanks for fixing this :)  What release will this be in? 4.8.1?


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-11-14 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Jonathan Wakely redi at gcc dot gnu.org changed:



   What|Removed |Added



   Target Milestone|--- |4.8.0



--- Comment #13 from Jonathan Wakely redi at gcc dot gnu.org 2012-11-14 
14:29:19 UTC ---

4.8.0


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-11-13 Thread dodji at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #10 from Dodji Seketeli dodji at gcc dot gnu.org 2012-11-13 
16:07:50 UTC ---

Author: dodji

Date: Tue Nov 13 16:07:39 2012

New Revision: 193479



URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=193479

Log:

PR c++/54466 - ICE with alias template which type-id is const qualified



Consider this short example:



templatetypename T

  struct X { };



templatetypename T

  using Y = const XT;



using Z = Yint;



G++ crashes in lookup_class_template_1 while trying to build the alias

template instantiation Yint.



I think this is indirectly due to the fact that that

lookup_class_template_1 can now yield a const qualified type like

'const XT'.



As a consequence, the code in lookup_template_class_1 that was trying

to access the TYPE_STUB_DECL field of the result of

lookup_template_class_1 should now be adjusted to access the

TYPE_STUB_DECL of the main variant of the resulting type instead (and

that is TYPE_MAIN_DECL); because qualified types (constructed with

build_qualified_type) have their TYPE_STUB_DECL set to NULL.



Fixed thus and tested on x86_64-unknown-linux-gnu against trunk.



gcc/cp



PR c++/54466

* pt.c (lookup_template_class_1): TYPE_STUB_DECL should be

accessed on the main variant of the type.



gcc/testsuite/



* g++.dg/cpp0x/alias-decl-26.C: New test file.



In the example of this patch, g++ crashes when trying to build the

alias template Yint



Added:

trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C

Modified:

trunk/gcc/cp/ChangeLog

trunk/gcc/cp/pt.c

trunk/gcc/testsuite/ChangeLog


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-11-13 Thread dodji at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Dodji Seketeli dodji at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #11 from Dodji Seketeli dodji at gcc dot gnu.org 2012-11-13 
16:09:27 UTC ---

Fixed in trunk (4.8).


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-27 Thread dodji at seketeli dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #9 from dodji at seketeli dot org dodji at seketeli dot org 
2012-10-27 07:59:12 UTC ---

A candidate patch has been sent to

http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02472.html.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-26 Thread dodji at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Dodji Seketeli dodji at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |dodji at gcc dot gnu.org

   |gnu.org |


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-26 Thread dodji at seketeli dot org

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466

--- Comment #8 from dodji at seketeli dot org dodji at seketeli dot org 
2012-10-26 15:13:10 UTC ---
paolo.carlini at oracle dot com gcc-bugzi...@gcc.gnu.org a écrit:

 Dodji, are there any chances you can look into this
 issue? The alias decls seem determinant.

Sure.  Sorry for the delay, I was buried into something else.  I am
looking into this now.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-17 Thread mattyclarkson at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #7 from Matt Clarkson mattyclarkson at gmail dot com 2012-10-17 
08:19:20 UTC ---

Sorry about the bloated bug report - that was how I came across it.  In the

future I'll submit smaller test cases.



Thanks for looking into this.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-16 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



Jonathan Wakely redi at gcc dot gnu.org changed:



   What|Removed |Added



   Keywords||rejects-valid

 Status|UNCONFIRMED |NEW

   Last reconfirmed||2012-10-16

 CC||dodji at gcc dot gnu.org

Summary|Recursive Type Alias,   |[C++11] Recursive Type

   |Member Function Pointer,|Alias, Member Function

   |Segmentation Fault  |Pointer, Segmentation Fault

 Ever Confirmed|0   |1



--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2012-10-16 
15:55:41 UTC ---

confirmed


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-16 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-16 
22:32:02 UTC ---

A shorter self contained testcase, not involving the whole std::shared_ptr,

would certainly help. Dodji, are there any chances you can look into this

issue? The alias decls seem determinant.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-16 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #4 from Jonathan Wakely redi at gcc dot gnu.org 2012-10-16 
23:09:30 UTC ---

templatetypename T

  struct X { };



templatetypename T

  using Y = const XT;



templatetypename T

  using Z = YT;


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-16 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com 2012-10-16 
23:13:18 UTC ---

Excellent.


[Bug c++/54466] [C++11] Recursive Type Alias, Member Function Pointer, Segmentation Fault

2012-10-16 Thread redi at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466



--- Comment #6 from Jonathan Wakely redi at gcc dot gnu.org 2012-10-16 
23:16:48 UTC ---

The second alias doesn't even have to be a template to show the problem:



templatetypename T

  struct X { };



templatetypename T

  using Y = const XT;



using Z = Yint;