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

            Bug ID: 109996
           Summary: csmith: -O2 -fno-strict-aliasing causing run time
                    trouble
           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 55173
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55173&action=edit
C source code

The attached C code does this:

[dcb38@fedora foundBugs]$ ../results/bin/gcc -w -O1 bug924.c
runData/keep/in.45.c: In function ‘func_5’:
runData/keep/in.45.c:434:18: note: the ABI for passing parameters with 32-byte
alignment has changed in GCC 4.6
[dcb38@fedora foundBugs]$ ./a.out
checksum = 7AACDAF2

[dcb38@fedora foundBugs]$ ../results/bin/gcc -w -O2 bug924.c
runData/keep/in.45.c: In function ‘func_5’:
runData/keep/in.45.c:434:18: note: the ABI for passing parameters with 32-byte
alignment has changed in GCC 4.6
[dcb38@fedora foundBugs]$ ./a.out
Segmentation fault (core dumped)

Normally, -fno-strict-aliasing helps, but not here:

[dcb38@fedora foundBugs]$ ../results/bin/gcc -w -O2 -fno-strict-aliasing
bug924.c
runData/keep/in.45.c: In function ‘func_5’:
runData/keep/in.45.c:434:18: note: the ABI for passing parameters with 32-byte
alignment has changed in GCC 4.6
[dcb38@fedora foundBugs]$ ./a.out
Segmentation fault (core dumped)

The bug seems to have existed for some time:

$ ../results.20220515/bin/gcc -w -g -O2 -fno-strict-aliasing bug924.c
runData/keep/in.45.c: In function ‘func_5’:
runData/keep/in.45.c:434:18: note: the ABI for passing parameters with 32-byte
alignment has changed in GCC 4.6
[dcb38@fedora foundBugs]$ ./a.out
Segmentation fault (core dumped)
[dcb38@fedora foundBugs]$

Reply via email to