https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80405
Bug ID: 80405 Summary: UBSAN: compile time crash with "type mismatch in shift expression" error Product: gcc Version: 7.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 Target Milestone: --- gcc x86_64, top of the trunk. > cat f.cpp extern unsigned int var_60, var_110; void foo() { var_110 = (!~0 >= unsigned(0 < 0)) << var_60; } > g++ -fsanitize=undefined -w -O0 -c f.cpp f.cpp: In function ‘void foo()’: f.cpp:2:6: error: type mismatch in shift expression void foo() { ^~~ int unsigned int unsigned int _2 = 1 << var_60.0; f.cpp:2:6: internal compiler error: verify_gimple failed <...>