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

            Bug ID: 108657
           Summary: csmith: possible wrong checksum with -O3 and
                    -ftrivial-auto-var-init=zero
           Product: gcc
           Version: 13.0
            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 54402
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54402&action=edit
C source code

For the attached C code, derived from csmith output, I get:

$ ~/gcc/results/bin/gcc -w bug880.c
$ ./a.out
checksum = F3A34B53
$ ~/gcc/results/bin/gcc -w -O2 bug880.c
$ ./a.out
checksum = F3A34B53
$ ~/gcc/results/bin/gcc -w -O2 -ftrivial-auto-var-init=zero bug880.c
$ ./a.out
checksum = F3A34B53
$ ~/gcc/results/bin/gcc -w -O3 -ftrivial-auto-var-init=zero bug880.c
$ ./a.out
checksum = BCC02729
$ ~/gcc/results/bin/gcc -w -O3  bug880.c
$ ./a.out
checksum = F3A34B53
$ 

Also, the possible bug seems to have first occurred sometime before 20230103

$ ~/gcc/results.20230103.asan.ubsan/bin/gcc -w -O3 -ftrivial-auto-var-init=zero
bug880.c
$ ./a.out
checksum = BCC02729
$

Reply via email to