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++/60393] New: [c++1y] ICE with with invalid functions with auto parameters Date: Sun, 02 Mar 2014 21:54:00 -0000 [thread overview] Message-ID: <bug-60393-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60393 Bug ID: 60393 Summary: [c++1y] ICE with with invalid functions with auto parameters Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-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 invalid code snippets (compiled with "-std=c++1y") trigger an ICE on trunk: ============================== void (*f)(auto) + 0; struct A { int i; }; ============================== bug.cc:1:17: error: expected initializer before '+' token void (*f)(auto) + 0; ^ bug.cc:5:7: error: data member 'i' cannot be a member template int i; ^ bug.cc:5:7: internal compiler error: in poplevel, at cp/decl.c:568 0x5c54a3 poplevel(int, int, int) ../../gcc/gcc/cp/decl.c:568 0x5feba8 end_template_decl() ../../gcc/gcc/cp/pt.c:3807 0x6a3941 finish_fully_implicit_template ../../gcc/gcc/cp/parser.c:32052 0x6acafc cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20487 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.] ============================== struct A { void foo(); }; void A::foo(auto) {} struct B { int i; }; ============================== bug.cc:6:6: error: prototype for 'void A::foo(auto:1)' does not match any in class 'A' void A::foo(auto) {} ^ bug.cc:3:8: error: candidate is: void A::foo() void foo(); ^ bug.cc:10:7: error: data member 'i' cannot be a member template int i; ^ bug.cc:10:7: internal compiler error: in poplevel, at cp/decl.c:568 0x5c54a3 poplevel(int, int, int) ../../gcc/gcc/cp/decl.c:568 0x5feba8 end_template_decl() ../../gcc/gcc/cp/pt.c:3807 0x6a3941 finish_fully_implicit_template ../../gcc/gcc/cp/parser.c:32052 0x6acafc cp_parser_member_declaration ../../gcc/gcc/cp/parser.c:20487 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.] Adam, these look similar to PR60377 you just fixed. Could you please have a look?
next reply other threads:[~2014-03-02 21:54 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-03-02 21:54 reichelt at gcc dot gnu.org [this message] 2014-03-08 9:33 ` [Bug c++/60393] " abutcher at gcc dot gnu.org 2014-03-08 11:53 ` 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-60393-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: linkBe 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).