public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58535] New: [4.8/4.9 Regression] ICE with virtual template function
@ 2013-09-25 21:00 reichelt at gcc dot gnu.org
  2013-09-26  9:33 ` [Bug c++/58535] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-09-25 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58535
           Summary: [4.8/4.9 Regression] ICE with virtual template
                    function
           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 invalid code snippet triggers an ICE since GCC 4.8.0:

======================================
struct A
{
  template<int> virtual void foo();
};
======================================

bug.cc:3:17: error: templates may not be 'virtual'
   template<int> virtual void foo();   
                 ^
bug.cc:3:35: internal compiler error: in check_member_template, at
cp/decl2.c:510
   template<int> virtual void foo();   
                                   ^
0x605d1b check_member_template(tree_node*)
        ../../gcc/gcc/cp/decl2.c:509
0x57f77f finish_member_template_decl(tree_node*)
        ../../gcc/gcc/cp/pt.c:290
0x64d574 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22459
0x62d222 cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:19698
0x62e236 cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19625
0x62e236 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:18880
0x630b90 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19096
0x630b90 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14080
0x6461ad cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11328
0x64a189 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10918
0x64c190 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10867
0x6551ae cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10764
0x653f0d cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10650
0x6557e6 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x6557e6 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28893
0x768164 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]

A c++1y variant crashes (on trunk) without an error message before the ICE:

======================================
struct A
{
  virtual void foo(auto);
};
======================================


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

end of thread, other threads:[~2013-10-02 18:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-25 21:00 [Bug c++/58535] New: [4.8/4.9 Regression] ICE with virtual template function reichelt at gcc dot gnu.org
2013-09-26  9:33 ` [Bug c++/58535] " rguenth at gcc dot gnu.org
2013-10-02 15:55 ` paolo.carlini at oracle dot com
2013-10-02 18:26 ` paolo at gcc dot gnu.org
2013-10-02 18:27 ` paolo at gcc dot gnu.org
2013-10-02 18:28 ` paolo.carlini at oracle 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).