public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58606] New: [4.8/4.9 Regression] [c++11] ICE with specialization in variadic template
Date: Thu, 03 Oct 2013 20:41:00 -0000	[thread overview]
Message-ID: <bug-58606-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 58606
           Summary: [4.8/4.9 Regression] [c++11] ICE with specialization
                    in variadic template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.8.0:

========================================
template<int&...> struct A
{
  template<typename> struct B;

  template<typename T> struct B<T*> {};
};
========================================

bug.cc:5:35: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_decl in lookup_template_class_1,
at cp/pt.c:7645
   template<typename T> struct B<T*> {};
                                   ^
0xcd83ea tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9176
0x54c851 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/gcc/tree.h:2649
0x5b44be lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7645
0x5b44be lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7695
0x6b4572 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:2856
0x64cc60 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:13219
0x64ce92 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:18752
0x642b6f cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5448
0x642b6f cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5173
0x6362ce cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:19194
0x6362ce cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18833
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
0x638180 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14081
0x64d679 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11328
0x651cf3 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:22580
0x654b18 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22456
0x6347e2 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:19704
0x6357de cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19631
0x6357de cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18886
0x638180 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19102
Please submit a full bug report, [etc.]


             reply	other threads:[~2013-10-03 20:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03 20:41 reichelt at gcc dot gnu.org [this message]
2013-10-03 22:52 ` [Bug c++/58606] " paolo.carlini at oracle dot com
2013-10-10 11:40 ` rguenth at gcc dot gnu.org
2013-10-16  9:49 ` jakub at gcc dot gnu.org
2014-01-27 18:24 ` jason at gcc dot gnu.org
2014-01-28  4:31 ` jason at gcc dot gnu.org
2014-01-28 13:45 ` jason at gcc dot gnu.org
2014-01-28 14:01 ` jason at gcc dot gnu.org
2014-02-21  4:43 ` jason at gcc dot gnu.org
2014-02-21 14:01 ` jason at gcc dot gnu.org
2014-02-21 21:07 ` [Bug c++/58606] [4.8 " reichelt at gcc dot gnu.org
2014-05-22  9:03 ` rguenth at gcc dot gnu.org
2014-07-31 15:55 ` jason at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-58606-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).