This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81024] New: ICE within convert_like_real
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Jun 2017 16:02:04 +0000
- Subject: [Bug c++/81024] New: ICE within convert_like_real
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81024
Bug ID: 81024
Summary: ICE within convert_like_real
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
Found by Alec Teal; reported to me over IRC.
Seen with gcc 4.8 and with trunk (r248825).
$ cat main.cc
namespace std {
template<class T> class initializer_list;
}
void WtfTest(int, const char*, const char*, const ::std::initializer_list<const
char*>&);
#define WTF(...) WtfTest(__LINE__,__FILE__,"potato",{__VA_ARGS__});
int main() { WTF("it","works") }
gcc main.cc
main.cc: In function ‘int main()’:
main.cc:5:66: internal compiler error: Segmentation fault
#define WTF(...) WtfTest(__LINE__,__FILE__,"potato",{__VA_ARGS__});
^
main.cc:6:14: note: in expansion of macro ‘WTF’
int main() { WTF("it","works") }
^~~
0xb7f806 crash_signal
../../src/gcc/toplev.c:338
0x60797d convert_like_real
../../src/gcc/cp/call.c:6805
0x6076bc convert_like_real
../../src/gcc/cp/call.c:6838
0x60a4cd build_over_call
../../src/gcc/cp/call.c:7840
0x61250e build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
../../src/gcc/cp/call.c:4262
0x727d25 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
../../src/gcc/cp/semantics.c:2479
0x6c990d cp_parser_postfix_expression
../../src/gcc/cp/parser.c:6998
0x6d0446 cp_parser_unary_expression
../../src/gcc/cp/parser.c:8117
0x6d0f65 cp_parser_cast_expression
../../src/gcc/cp/parser.c:8796
0x6d1562 cp_parser_binary_expression
../../src/gcc/cp/parser.c:8898
0x6d1cb2 cp_parser_assignment_expression
../../src/gcc/cp/parser.c:9186
0x6d923a cp_parser_expression
../../src/gcc/cp/parser.c:9353
0x6da32a cp_parser_expression_statement
../../src/gcc/cp/parser.c:10912
0x6c5376 cp_parser_statement
../../src/gcc/cp/parser.c:10728
0x6c6377 cp_parser_statement_seq_opt
../../src/gcc/cp/parser.c:11054
0x6c642f cp_parser_compound_statement
../../src/gcc/cp/parser.c:11008
0x6e1330 cp_parser_function_body
../../src/gcc/cp/parser.c:21447
0x6e1330 cp_parser_ctor_initializer_opt_and_function_body
../../src/gcc/cp/parser.c:21483
0x6e1b2e cp_parser_function_definition_after_declarator
../../src/gcc/cp/parser.c:26291
0x6e2a9c cp_parser_function_definition_from_specifiers_and_declarator
../../src/gcc/cp/parser.c:26203