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

* [Bug c++/58535] [4.8/4.9 Regression] ICE with virtual template function
  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 ` rguenth at gcc dot gnu.org
  2013-10-02 15:55 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-09-26  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug c++/58535] [4.8/4.9 Regression] ICE with virtual template function
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-02 15:55 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-10-02
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
   Target Milestone|4.9.0                       |4.8.2
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug c++/58535] [4.8/4.9 Regression] ICE with virtual template function
  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
  4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-02 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Oct  2 18:25:55 2013
New Revision: 203123

URL: http://gcc.gnu.org/viewcvs?rev=203123&root=gcc&view=rev
Log:
/cp
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58535
    * parser.c (cp_parser_function_specifier_opt): Upon error about
    virtual templates don't set ds_virtual.
    (finish_fully_implicit_template): Reject virtual implicit templates.

/testsuite
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58535
    * g++.dg/parse/crash65.C: New.
    * g++.dg/cpp1y/pr58535.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr58535.C
    trunk/gcc/testsuite/g++.dg/parse/crash65.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/58535] [4.8/4.9 Regression] ICE with virtual template function
  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
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: paolo at gcc dot gnu.org @ 2013-10-02 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Oct  2 18:27:30 2013
New Revision: 203124

URL: http://gcc.gnu.org/viewcvs?rev=203124&root=gcc&view=rev
Log:
/cp
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58535
    * parser.c (cp_parser_function_specifier_opt): Upon error about
    virtual templates don't set ds_virtual.

/testsuite
2013-10-02  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/58535
    * g++.dg/parse/crash62.C: New.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/g++.dg/parse/crash62.C
Modified:
    branches/gcc-4_8-branch/gcc/cp/ChangeLog
    branches/gcc-4_8-branch/gcc/cp/parser.c
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/58535] [4.8/4.9 Regression] ICE with virtual template function
  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
                   ` (3 preceding siblings ...)
  2013-10-02 18:27 ` paolo at gcc dot gnu.org
@ 2013-10-02 18:28 ` paolo.carlini at oracle dot com
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-02 18:28 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed mainline and 4.8.2.


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