https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77486
Bug ID: 77486 Summary: ubsan detects runtime error: left shift of negative value -3 at real_hash in real.c:2890 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: --- Compiling the following with ubsan sanitized gcc f(void) { float y=0; if(y<0.1) y=1.0; } I get ../../gcc-trunk-239945/gcc/real.c:2890:25: runtime error: left shift of negative value -3 real.c:2890 is " h |= REAL_EXP (r) << 3;"