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

            Bug ID: 115971
           Summary: [12 Regression]
           Product: gcc
           Version: 12.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bic60176 at gmail dot com
                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
  Target Milestone: ---

Created attachment 58693
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58693&action=edit
testcase

OS: Ubuntu 22.04.3 LTS
We found that GCC failed to detect a signed integer overflow error in
gcc-12.3.0 at optimization level 0.

$ ~/compiler-builds/gcc-13.2.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s -w
-O0 testcase.c -o exec
$ timeout 2s ./exec 2>exec.err
0
$ cat exec.err
testcase.c:10:36: runtime error: signed integer overflow: 267886508 * 9 cannot
be represented in type 'int'
$ ~/compiler-builds/gcc-12.3.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s -w
-O0 testcase.c -o exec
$ timeout 2s ./exec 2>exec.err
0
$ cat exec.err
$

Reply via email to