https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67692
Bug ID: 67692 Summary: [concepts] ICE when using requires in non-concept contexts Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ryan.burn at gmail dot com Target Milestone: --- The below code produces an ICE compiling with -std=c++1z: //////////////////////////////////////// template<class T> bool f(T x) { return requires(T x) { ++x; }; } int main() { f(3); return 0; } //////////////////////////////////////// Stack trace: main.cpp: In function ‘bool f(T) [with T = int]’: main.cpp:5:3: internal compiler error: in gimplify_expr, at gimplify.c:8848 }; ^ 0xa99c53 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8848 0xaa6bc0 gimplify_modify_expr ../../gcc/gcc/gimplify.c:4625 0xa979d2 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8116 0xa9bb96 gimplify_stmt(tree_node**, gimple_statement_base**) ../../gcc/gcc/gimplify.c:5526 0xa990d6 gimplify_and_add(tree_node*, gimple_statement_base**) ../../gcc/gcc/gimplify.c:398 0xa990d6 gimplify_return_expr ../../gcc/gcc/gimplify.c:1291 0xa990d6 gimplify_expr(tree_node**, gimple_statement_base**, gimple_statement_base**, bool (*)(tree_node*), int) ../../gcc/gcc/gimplify.c:8363 0xa9bb96 gimplify_stmt(tree_node**, gimple_statement_base**) ../../gcc/gcc/gimplify.c:5526 0xa9d929 gimplify_body(tree_node*, bool) ../../gcc/gcc/gimplify.c:9250 0xa9df46 gimplify_function_tree(tree_node*) ../../gcc/gcc/gimplify.c:9408 0x92ccd7 cgraph_node::analyze() ../../gcc/gcc/cgraphunit.c:636 0x92fedb analyze_functions ../../gcc/gcc/cgraphunit.c:1028 0x930a68 symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2477 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.