https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80259
Bug ID: 80259 Summary: [5/6/7 Regression] ICE deleting friend function Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following invalid code snippet triggers an ICE since GCC 5.1.0: ================================ void foo() {} struct A { friend void foo() = delete; }; ================================ bug.cc: In function 'void foo()': bug.cc:1:6: internal compiler error: tree check: expected block, have error_mark in lower_function_body, at gimple-low.c:98 void foo() {} ^~~ 0x100a3ec tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/gcc/tree.c:9817 0x146eb3a tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/gcc/tree.h:3064 0x146eb3a lower_function_body ../../gcc/gcc/gimple-low.c:98 0x146eb3a execute ../../gcc/gcc/gimple-low.c:181 Please submit a full bug report [etc.]