public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60222] New: [4.8/4.9 Regression] ICE with reference as template parameter
@ 2014-02-16 16:54 reichelt at gcc dot gnu.org
  2014-02-16 16:55 ` [Bug c++/60222] " reichelt at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-16 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60222
           Summary: [4.8/4.9 Regression] ICE with reference as template
                    parameter
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org
                CC: jason at gcc dot gnu.org

The following valid code snippet triggers an ICE on the 4.8 branch and trunk:

==========================================
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:7674
   template<typename T> struct B<T*> {};
                                   ^
0xdbfcc4 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9192
0x5bc4b9 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc/gcc/tree.h:2749
0x6251fc lookup_template_class_1
        ../../gcc/gcc/cp/pt.c:7674
0x6251fc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/gcc/cp/pt.c:7725
0x72dcb2 finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/semantics.c:2953
0x6c2068 cp_parser_template_id
        ../../gcc/gcc/cp/parser.c:13440
0x6c2388 cp_parser_class_name
        ../../gcc/gcc/cp/parser.c:19074
0x6b3bb9 cp_parser_qualifying_entity
        ../../gcc/gcc/cp/parser.c:5524
0x6b3bb9 cp_parser_nested_name_specifier_opt
        ../../gcc/gcc/cp/parser.c:5249
0x6aa243 cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:19529
0x6aa243 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19155
0x6aa243 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19437
0x6aa243 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14302
0x6c2ba0 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11547
0x6c8883 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:23039
0x6c8d64 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22915
0x6a5f36 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:20049
0x6a9724 cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19976
0x6a9724 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19210
0x6a9724 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19437
Please submit a full bug report, [etc.]

The example compiles fine with GCC 4.8.0 - 4.8.2.

The regression might be fallout from the fix for PR58606.
Jason, would you mind having a look?


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

end of thread, other threads:[~2014-02-21 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-16 16:54 [Bug c++/60222] New: [4.8/4.9 Regression] ICE with reference as template parameter reichelt at gcc dot gnu.org
2014-02-16 16:55 ` [Bug c++/60222] " reichelt at gcc dot gnu.org
2014-02-17 10:00 ` jakub at gcc dot gnu.org
2014-02-21  4:56 ` [Bug c++/60222] [4.9 " jason at gcc dot gnu.org
2014-02-21 14:01 ` jason at gcc dot gnu.org
2014-02-21 14:30 ` jakub at gcc dot gnu.org

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