[Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 12 16:10:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289
Bug ID: 64289
Summary: ICE with -fsanitize=float-cast-overflow
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: sanitizer
Assignee: jakub at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
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,
mpolacek at gcc dot gnu.org
/* { dg-do compile } */
/* { dg-options "-fsanitize=float-cast-overflow" } */
int
foo (int a)
{
return (int) (0 ? 0 : a ? a : 0.5);
}
ICEs when compiled as C, because save_expr must not be used until c_fully_fold.
Unfortunately as convert.c is shared by all FEs, it can't call c_save_expr
instead. So, either we'd need to turn it into a langhook, or we need a
workaround in c-convert.c like we've done already for the other save_expr in
convert.c case.
More information about the Gcc-bugs
mailing list