https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69854
Bug ID: 69854 Summary: [6 regression] ICE: tree check: expected class 'constant', have 'binary' (plus_expr) in generic_simplify_65, at generic-match.c:3110 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: nsz at gcc dot gnu.org Target Milestone: --- Created attachment 37725 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37725&action=edit test case gcc -frounding-math -Ofast -c t.c t.c: In function 'acos': t.c:62:1: internal compiler error: tree check: expected class 'constant', have 'binary' (plus_expr) in generic_simplify_65, at generic-match.c:3110 } ^ 0xda99d7 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) S/gcc/tree.c:9688 0x5b706c tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) S/gcc/tree.h:3129 0x5b706c generic_simplify_65 B/gcc/generic-match.c:3110 0xf20cf5 generic_simplify_PLUS_EXPR B/gcc/generic-match.c:9662 0xf4213d generic_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) B/gcc/generic-match.c:25902 0x84b7be fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) S/gcc/fold-const.c:9235 0x856eaa fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*) S/gcc/fold-const.c:12451 0xd3a29f find_tail_calls S/gcc/tree-tailcall.c:561 0xd39bff find_tail_calls S/gcc/tree-tailcall.c:442 0xd3ae51 tree_optimize_tail_calls_1 S/gcc/tree-tailcall.c:982 Please submit a full bug report, with preprocessed source if appropriate. gcc version 6.0.0 20160217 (experimental) (GCC) i can reproduce it on arm, aarch64 and x86_64 with the attached test case. (found while building acos.c in musl libc with CFLAGS+=-Ofast, the test case is preprocessed and somewhat cleaned up, it's target independent)