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

            Bug ID: 88239
           Summary: ./gcc.dg/torture/pr84929.c with -O3 -march=native
                    causes ubsan error
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

From the gcc testsuite, file ./gcc.dg/torture/pr84929.c,
compiled with a ubsan version of recent gcc trunk, and
compiler flags -c -O3 -march=native, does this:

$ ~/gcc/results/bin/gcc -c -O3 -march=native ./gcc.dg/torture/pr84929.c
../../trunk/gcc/poly-int.h:753:21: runtime error: signed integer overflow:
-5621332293356458048 * 8 cannot be represented in type 'long int'
../../trunk/gcc/tree-ssa-loop-prefetch.c:468:14: runtime error: signed integer
overflow: 7818038963515661296 * 4 cannot be represented in type 'long int'
$ 

The error about poly-int.h occurs in many source code files
and should be ignored. It is the second runtime error I noticed.

This bug seems to have existed since sometime before revision 265631.

/proc/cpuinfo says

vendor_id       : AuthenticAMD
cpu family      : 21
model           : 2
model name      : AMD FX(tm)-8350 Eight-Core Processor

Reply via email to