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

            Bug ID: 109780
           Summary: csmith: runtime crash with -O2 -march=znver1
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 55023
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55023&action=edit
C source code

The attached C code seems to work fine with -O2:

$ ../results.20230507.asan.ubsan/bin/gcc -w -O2  bug916.c
$ ./a.out
checksum = 44DCF65B
$ 

But adding -march=znver1 seems to cause trouble:

$ ../results.20230507.asan.ubsan/bin/gcc -w -O2 -march=znver1  bug916.c
$ ./a.out
Segmentation fault (core dumped)
$ 

Adding the -fno-strict-aliasing flag doesn't seem to help:

$ ../results.20230507.asan.ubsan/bin/gcc -w -O2 -march=znver1
-fno-strict-aliasing  bug916.c
$ ./a.out
Segmentation fault (core dumped)
$ 

The bug seems to have existed for a while:

$ ../results.20230417/bin/gcc -w -O2 -march=znver1 -fno-strict-aliasing 
bug916.c
$ ./a.out
Segmentation fault (core dumped)
$

Reply via email to