https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80875
Bug ID: 80875 Summary: UBSAN: compile time crash in fold_binary_loc at fold-const.c:9817 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: babokin at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- gcc rev248384, x86_64. > cat f.cpp void foo() { ~2147483647 * (0 / 0); } > g++ -fsanitize=undefined -w -c f.cpp f.cpp: In function ‘void foo()’: f.cpp:3:1: internal compiler error: tree check: expected class ‘constant’, have ‘unary’ (negate_expr) in fold_binary_loc, at fold-const.c:9817 } ^ 0x10384a7 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc_svn/gcc/tree.c:9909 <...>