https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100591

            Bug ID: 100591
           Summary: -fsanitize=undefined fails to detect undefined
                    floating to integer conversion
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sch...@linux-m68k.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, marxin at 
gcc dot gnu.org
  Target Milestone: ---

$ cat undef.c
#include <stdio.h>

volatile double d = 0.0/0.0;

int
main (void)
{
  printf ("%d\n", (int) d);
}
$ gcc -fsanitize=undefined undef.c 
$ ./a.out 
-2147483648

Reply via email to