This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/66630] New: Missing ubsan/ftrapv error


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

            Bug ID: 66630
           Summary: Missing ubsan/ftrapv error
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

int
main (void)
{
  int i = -__INT_MAX__ - 1;
  int j = -i - 1;
  return j;
}

$ xgcc -fsanitize=undefined a.c; ./a.out

says nothing :(.  We should report the overflow when computing -i.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]