https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71074
Bug ID: 71074 Summary: combine.c in simplify_comparison sanitizer detects left shift of negative value Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- /* gcc -O2 sanitizer undefined runtime error */ /* In gcc trunk 7.0 */ /* ../../gcc7/gcc/combine.c:12340:18: runtime error: left shift of negative value -13 */ /* combine.c:12340 is "const_op <<= INTVAL (XEXP (op0, 1));" */ /* From PR target/49238 */ int bar (void); void foo (unsigned long long a, int b) { int i; for (a = -12; a >= 10; a = bar ()) break; if (i == bar () || bar () >= a) bar (); }