This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64466] New: A generic lambda in a class template causes an ICE in gimplify
- From: "ville.voutilainen at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Jan 2015 16:15:19 +0000
- Subject: [Bug c++/64466] New: A generic lambda in a class template causes an ICE in gimplify
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64466
Bug ID: 64466
Summary: A generic lambda in a class template causes an ICE in
gimplify
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ville.voutilainen at gmail dot com
CC: jason at redhat dot com
template<typename T> struct my_queue {
void push(T){ }
void ice(){ trav([&](auto &&v){ push(v); }); }
template<typename F> void trav(F &&f){ f(T()); }
};
template class my_queue<int>;
Clang accepts the code. gcc ICEs:
lhmouse2.cpp: In lambda function:
lhmouse2.cpp:3:41: internal compiler error: Segmentation fault
void ice(){ trav([&](auto &&v){ push(v); }); }
^
0xca552f crash_signal
../../gcc/toplev.c:358
0xa009f8 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
../../gcc/tree.h:2892
0xa009f8 size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*)
../../gcc/fold-const.c:1735
0xabfa04 gimplify_compound_lval
../../gcc/gimplify.c:2012
0xab7619 gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
../../gcc/gimplify.c:7686
0xac19af gimplify_call_expr
../../gcc/gimplify.c:2449
0xab790f gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
../../gcc/gimplify.c:7705
0xabbe16 gimplify_stmt(tree_node**, gimple_statement_base**)
../../gcc/gimplify.c:5473
0xab80ee gimplify_cleanup_point_expr
../../gcc/gimplify.c:5249
0xab80ee gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
../../gcc/gimplify.c:8097
0xabbe16 gimplify_stmt(tree_node**, gimple_statement_base**)
../../gcc/gimplify.c:5473
0xabccb5 gimplify_bind_expr
../../gcc/gimplify.c:1110
0xab78ed gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
../../gcc/gimplify.c:7931
0xabbe16 gimplify_stmt(tree_node**, gimple_statement_base**)
../../gcc/gimplify.c:5473
0xabd775 gimplify_body(tree_node*, bool)
../../gcc/gimplify.c:8843
0xabdd76 gimplify_function_tree(tree_node*)
../../gcc/gimplify.c:8996
0x903397 cgraph_node::analyze()
../../gcc/cgraphunit.c:613
0x905c57 analyze_functions
../../gcc/cgraphunit.c:1001
0x906855 symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2351
0x6e3a8b cp_write_global_declarations()
../../gcc/cp/decl2.c:4742
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.