public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60052] New: [c++1y] ICE with auto as member function parameter
@ 2014-02-04  7:14 reichelt at gcc dot gnu.org
  2014-02-21  7:48 ` [Bug c++/60052] " abutcher at gcc dot gnu.org
  2014-02-21 21:13 ` reichelt at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-04  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60052
           Summary: [c++1y] ICE with auto as member function parameter
           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++1y") triggers an
ICE on trunk:

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

void A::foo(auto) {}

struct B
{
  void bar(auto);
};
==================================

bug.cc:10:11: internal compiler error: Segmentation fault
   void bar(auto);
           ^
0xba9c8f crash_signal
        ../../gcc/gcc/toplev.c:337
0x6ce47b tree_check
        ../../gcc/gcc/tree.h:2708
0x6ce47b synthesize_implicit_template_parm
        ../../gcc/gcc/cp/parser.c:31950
0x6ce47b cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:14504
0x6abcdd cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14380
0x6c5400 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11547
0x6c79c7 cp_parser_parameter_declaration
        ../../gcc/gcc/cp/parser.c:18432
0x6c8da1 cp_parser_parameter_declaration_list
        ../../gcc/gcc/cp/parser.c:18258
0x6c93f2 cp_parser_parameter_declaration_clause
        ../../gcc/gcc/cp/parser.c:18179
0x6bf3f0 cp_parser_direct_declarator
        ../../gcc/gcc/cp/parser.c:17072
0x6bf3f0 cp_parser_declarator
        ../../gcc/gcc/cp/parser.c:16943
0x6a890d cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:20295
0x6abf74 cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:19976
0x6abf74 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19210
0x6abf74 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19437
0x6abf74 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14302
0x6c5400 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11547
0x6cbff9 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11137
0x6af4b3 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6d67b2 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10983
Please submit a full bug report, [etc.]


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

* [Bug c++/60052] [c++1y] ICE with auto as member function parameter
  2014-02-04  7:14 [Bug c++/60052] New: [c++1y] ICE with auto as member function parameter reichelt at gcc dot gnu.org
@ 2014-02-21  7:48 ` abutcher at gcc dot gnu.org
  2014-02-21 21:13 ` reichelt at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: abutcher at gcc dot gnu.org @ 2014-02-21  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Adam Butcher <abutcher at gcc dot gnu.org> ---
Author: abutcher
Date: Fri Feb 21 07:47:55 2014
New Revision: 207980

URL: http://gcc.gnu.org/viewcvs?rev=207980&root=gcc&view=rev
Log:
Fix PR c++/60052 and PR c++/60053.

    PR c++/60052
    PR c++/60053
    * parser.c (cp_parser_parameter_declaration_list): Correctly reset
    implicit_template_scope upon leaving an out-of-line generic member
    function definition.

    PR c++/60052
    PR c++/60053
    * g++.dg/cpp1y/pr60052.C: New testcase.
    * g++.dg/cpp1y/pr60053.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr60052.C
    trunk/gcc/testsuite/g++.dg/cpp1y/pr60053.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/60052] [c++1y] ICE with auto as member function parameter
  2014-02-04  7:14 [Bug c++/60052] New: [c++1y] ICE with auto as member function parameter reichelt at gcc dot gnu.org
  2014-02-21  7:48 ` [Bug c++/60052] " abutcher at gcc dot gnu.org
@ 2014-02-21 21:13 ` reichelt at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-02-21 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.9.0

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Fixed by Adam's patch.


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-04  7:14 [Bug c++/60052] New: [c++1y] ICE with auto as member function parameter reichelt at gcc dot gnu.org
2014-02-21  7:48 ` [Bug c++/60052] " abutcher at gcc dot gnu.org
2014-02-21 21:13 ` reichelt 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).