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

            Bug ID: 61185
           Summary: Wrong value in error message
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek 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

int
main ()
{
  unsigned i = 32, j = 40;
  int u = 9;
  u <<= i - j;
}

with -fsanitize=shift says
s.c:6:5: runtime error: shift exponent -8 is negative
but it should say
s.c:6:5: runtime error: shift exponent 4294967288 is too large for 32-bit type
'int'

Reply via email to