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++/58596] New: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer Date: Wed, 02 Oct 2013 20:18:00 -0000 [thread overview] Message-ID: <bug-58596-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58596 Bug ID: 58596 Summary: [4.8/4.9 Regression] [c++11] ICE with decltype in non-static data member initializer 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 code snippet (compiled with "-std=c++11") triggers an ICE since GCC 4.8.0: ============================================== struct A { int i = [] { return decltype(i)(); }(); }; ============================================== bug.cc: In lambda function: bug.cc:3:32: internal compiler error: Segmentation fault int i = [] { return decltype(i)(); }(); ^ 0xaef4bf crash_signal ../../gcc/gcc/toplev.c:335 0x54c0cd contains_struct_check ../../gcc/gcc/tree.h:2722 0x54c0cd build_new_op_1 ../../gcc/gcc/cp/call.c:5154 0x54cf47 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/gcc/cp/call.c:5513 0x672529 build_x_indirect_ref(unsigned int, tree_node*, ref_operator, int) ../../gcc/gcc/cp/typeck.c:2866 0x6b165a finish_non_static_data_member(tree_node*, tree_node*, tree_node*) ../../gcc/gcc/cp/semantics.c:1580 0x6b6b5f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc/gcc/cp/semantics.c:3418 0x642cfb cp_parser_decltype_expr ../../gcc/gcc/cp/parser.c:11653 0x642cfb cp_parser_decltype ../../gcc/gcc/cp/parser.c:11781 0x65a862 cp_parser_simple_type_specifier ../../gcc/gcc/cp/parser.c:14288 0x641fe4 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5737 0x64483d cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:7009 0x64540f cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:7701 0x6458cf cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:7937 0x647733 cp_parser_expression ../../gcc/gcc/cp/parser.c:8099 0x641125 cp_parser_expression ../../gcc/gcc/cp/parser.c:8138 0x641125 cp_parser_lambda_body ../../gcc/gcc/cp/parser.c:9035 0x641125 cp_parser_lambda_expression ../../gcc/gcc/cp/parser.c:8574 0x641125 cp_parser_primary_expression ../../gcc/gcc/cp/parser.c:4230 0x642050 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:5814 Please submit a full bug report, [etc.]
next reply other threads:[~2013-10-02 20:18 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-02 20:18 reichelt at gcc dot gnu.org [this message] 2013-10-02 21:49 ` [Bug c++/58596] " paolo.carlini at oracle dot com 2013-10-03 11:33 ` mpolacek at gcc dot gnu.org 2013-10-10 11:42 ` rguenth at gcc dot gnu.org 2013-10-16 9:50 ` jakub at gcc dot gnu.org 2013-10-17 14:47 ` paolo.carlini at oracle dot com 2013-10-17 17:17 ` paolo.carlini at oracle dot com 2013-10-17 19:43 ` reichelt at gcc dot gnu.org 2013-10-17 21:54 ` paolo.carlini at oracle dot com 2013-10-18 6:58 ` jakub at gcc dot gnu.org 2013-10-18 8:29 ` jakub at gcc dot gnu.org 2013-10-18 11:10 ` LpSolit at netscape dot net 2013-10-18 11:14 ` paolo.carlini at oracle dot com 2013-10-18 11:16 ` jakub 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-58596-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).