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++/60390] New: [c++1y] ICE with declaring function with auto parameter as friend
Date: Sun, 02 Mar 2014 21:31:00 -0000	[thread overview]
Message-ID: <bug-60390-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 60390
           Summary: [c++1y] ICE with declaring function with auto
                    parameter as friend
           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: abutcher 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);
};

struct B
{
  friend void A::foo(auto);
};
===========================================

bug.cc:8:26: internal compiler error: in poplevel_class, at
cp/name-lookup.c:2951
   friend void A::foo(auto);
                          ^
0x783a07 poplevel_class()
        ../../gcc/gcc/cp/name-lookup.c:2951
0x667d28 popclass()
        ../../gcc/gcc/cp/class.c:7129
0x66818a pop_nested_class()
        ../../gcc/gcc/cp/class.c:7275
0x6c2cf1 cp_parser_direct_declarator
        ../../gcc/gcc/cp/parser.c:17479
0x6c2cf1 cp_parser_declarator
        ../../gcc/gcc/cp/parser.c:16947
0x6ac38d cp_parser_member_declaration
        ../../gcc/gcc/cp/parser.c:20353
0x6afa74 cp_parser_member_specification_opt
        ../../gcc/gcc/cp/parser.c:20034
0x6afa74 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:19268
0x6afa74 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:19495
0x6afa74 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14305
0x6c8f70 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11547
0x6cfb49 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11137
0x6b2ff3 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11086
0x6da2b2 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10983
0x6d8fa8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10869
0x6da85a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4014
0x6da85a c_parse_file()
        ../../gcc/gcc/cp/parser.c:31595
0x7f9f53 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]

This is similar to PR60064.
Adam, you might want to have a look.


             reply	other threads:[~2014-03-02 21:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 21:31 reichelt at gcc dot gnu.org [this message]
2014-03-15 21:18 ` [Bug c++/60390] " abutcher at gcc dot gnu.org
2014-03-17 20:03 ` abutcher at gcc dot gnu.org
2014-03-17 20:06 ` abutcher 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-60390-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).