public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
@ 2015-06-24  6:47 allan at archlinux dot org
  2015-06-24  7:11 ` [Bug c++/66647] " trippels at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: allan at archlinux dot org @ 2015-06-24  6:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

            Bug ID: 66647
           Summary: [5/6 regression] ICE: in instantiate_class_template_1,
                    at cp/pt.c:9254
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: allan at archlinux dot org
  Target Milestone: ---

Created attachment 35838
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35838&action=edit
testcase

An ICE seen in gcc-5-20150519.  Works in 4.9.2.

A reducded-ish testcase attached.

g++ -std=c++11 testcase.ii


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
@ 2015-06-24  7:11 ` trippels at gcc dot gnu.org
  2015-06-24  7:16 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-24  7:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |trippels at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Could you please attach the unreduced testcase?


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
  2015-06-24  7:11 ` [Bug c++/66647] " trippels at gcc dot gnu.org
@ 2015-06-24  7:16 ` rguenth at gcc dot gnu.org
  2015-06-24  8:06 ` trippels at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-24  7:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.2


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
  2015-06-24  7:11 ` [Bug c++/66647] " trippels at gcc dot gnu.org
  2015-06-24  7:16 ` rguenth at gcc dot gnu.org
@ 2015-06-24  8:06 ` trippels at gcc dot gnu.org
  2015-06-24  8:25 ` allan at archlinux dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-06-24  8:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-24
      Known to work|                            |4.9.2
     Ever confirmed|0                           |1
      Known to fail|                            |5.0, 6.0

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
markus@x4 tmp % cat testcase.ii
template <typename _Tp> struct A
{
  static constexpr _Tp value = 1;
};
template <typename> class B
{
public:
  template <typename> struct rebind
  {
  };
};

template <typename _Alloc, typename _Tp> class C
{
  template <typename _Alloc2, typename _Tp2>
  static A<int> _S_chk (typename _Alloc2::template rebind<_Tp2> *);

public:
  using __type = decltype (_S_chk<_Alloc, _Tp> (0));
};

template <typename _Alloc, typename _Tp, int = C<_Alloc, _Tp>::__type::value>
struct D;
template <typename _Alloc, typename _Tp> struct D<_Alloc, _Tp, 1>
{
  typedef typename _Alloc::template rebind<_Tp> __type;
};
template <typename _Alloc> struct F
{
  template <typename _Tp> using rebind_alloc = typename D<_Alloc, _Tp>::__type;
};
template <typename _Alloc> struct __alloc_traits
{
  template <typename> struct rebind
  {
    typedef typename F<_Alloc>::template rebind_alloc<int> other;
  };
};
template <typename _Alloc> struct G
{
  typename __alloc_traits<_Alloc>::template rebind<int>::other _Tp_alloc_type;
};
template <typename _Tp, typename _Alloc = B<_Tp> > class vector : G<_Alloc>
{
};

template <int> using tfuncptr = void();
template <int d> struct H
{
  vector<tfuncptr<d> > funcs;
};


markus@x4 tmp % g++ -std=c++11 testcase.ii
testcase.ii: In instantiation of ‘struct B<void()>::rebind<int>’:
testcase.ii:41:64:   required from ‘struct G<B<tfuncptr<d> > >’
testcase.ii:43:58:   required from ‘class vector<tfuncptr<d> >’
testcase.ii:50:24:   required from here
testcase.ii:8:30: internal compiler error: in instantiate_class_template_1, at
cp/pt.c:9267
   template <typename> struct rebind
                              ^
0x662f01 instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:9266
0x662f01 instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:9730
0x70763b complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:139
0x6629b9 instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:9503
0x6629b9 instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:9730
0x70763b complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:139
0x70782f complete_type_or_maybe_complain(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck.c:151
0x5faf79 xref_basetypes(tree_node*, tree_node*)
        ../../gcc/gcc/cp/decl.c:12474
0x662246 instantiate_class_template_1
        ../../gcc/gcc/cp/pt.c:9328
0x662246 instantiate_class_template(tree_node*)
        ../../gcc/gcc/cp/pt.c:9730
0x70763b complete_type(tree_node*)
        ../../gcc/gcc/cp/typeck.c:139
0x609350 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        ../../gcc/gcc/cp/decl.c:10782
0x6ac556 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
        ../../gcc/gcc/cp/decl2.c:876
0x6fb20b cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:21123
0x6d6e0d cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:20675
0x6d6e0d cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19867
0x6d6e0d cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:20103
0x6d6e0d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14732
0x6ea87e cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11958
0x6f9e98 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:23771
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-490043-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 24 08:24:03 2015
Return-Path: <gcc-bugs-return-490043-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23217 invoked by alias); 24 Jun 2015 08:24:02 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 22940 invoked by uid 48); 24 Jun 2015 08:23:58 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
Date: Wed, 24 Jun 2015 08:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.2
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-66647-4-xqHznRPqAj@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66647-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66647-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-06/txt/msg02375.txt.bz2
Content-length: 407

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf647

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r217250.


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (2 preceding siblings ...)
  2015-06-24  8:06 ` trippels at gcc dot gnu.org
@ 2015-06-24  8:25 ` allan at archlinux dot org
  2015-06-24 20:00 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: allan at archlinux dot org @ 2015-06-24  8:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

--- Comment #4 from Allan McRae <allan at archlinux dot org> ---
Created attachment 35839
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35839&action=edit
Unreduced testcase

Unreduced testcase attached.


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (4 preceding siblings ...)
  2015-06-24 20:00 ` jason at gcc dot gnu.org
@ 2015-06-24 20:00 ` jason at gcc dot gnu.org
  2015-06-24 20:24 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-24 20:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (3 preceding siblings ...)
  2015-06-24  8:25 ` allan at archlinux dot org
@ 2015-06-24 20:00 ` jason at gcc dot gnu.org
  2015-06-24 20:00 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-24 20:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jun 24 19:59:28 2015
New Revision: 224917

URL: https://gcc.gnu.org/viewcvs?rev=224917&root=gcc&view=rev
Log:
        PR c++/66647
        * pt.c (dependent_type_p_r): Check for dependent alias template
        specialization sooner.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-49.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (5 preceding siblings ...)
  2015-06-24 20:00 ` jason at gcc dot gnu.org
@ 2015-06-24 20:24 ` jason at gcc dot gnu.org
  2015-06-24 20:27 ` jason at gcc dot gnu.org
  2015-06-25 10:24 ` mail2benny at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-24 20:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Jun 24 20:23:53 2015
New Revision: 224921

URL: https://gcc.gnu.org/viewcvs?rev=224921&root=gcc&view=rev
Log:
        PR c++/66647
        * pt.c (dependent_type_p_r): Check for dependent alias template
        specialization sooner.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/cpp0x/alias-decl-49.C
Modified:
    branches/gcc-5-branch/gcc/cp/ChangeLog
    branches/gcc-5-branch/gcc/cp/pt.c


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (6 preceding siblings ...)
  2015-06-24 20:24 ` jason at gcc dot gnu.org
@ 2015-06-24 20:27 ` jason at gcc dot gnu.org
  2015-06-25 10:24 ` mail2benny at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-24 20:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed.


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

* [Bug c++/66647] [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254
  2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
                   ` (7 preceding siblings ...)
  2015-06-24 20:27 ` jason at gcc dot gnu.org
@ 2015-06-25 10:24 ` mail2benny at gmail dot com
  8 siblings, 0 replies; 10+ messages in thread
From: mail2benny at gmail dot com @ 2015-06-25 10:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66647

--- Comment #8 from Benny <mail2benny at gmail dot com> ---
Wow, that went really quick! Many thanks! Very impressive.


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

end of thread, other threads:[~2015-06-25 10:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-24  6:47 [Bug c++/66647] New: [5/6 regression] ICE: in instantiate_class_template_1, at cp/pt.c:9254 allan at archlinux dot org
2015-06-24  7:11 ` [Bug c++/66647] " trippels at gcc dot gnu.org
2015-06-24  7:16 ` rguenth at gcc dot gnu.org
2015-06-24  8:06 ` trippels at gcc dot gnu.org
2015-06-24  8:25 ` allan at archlinux dot org
2015-06-24 20:00 ` jason at gcc dot gnu.org
2015-06-24 20:00 ` jason at gcc dot gnu.org
2015-06-24 20:24 ` jason at gcc dot gnu.org
2015-06-24 20:27 ` jason at gcc dot gnu.org
2015-06-25 10:24 ` mail2benny at gmail dot com

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).