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

            Bug ID: 125869
           Summary: [17 regression] binutils pr25754-1ba FAILs
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 64764
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64764&action=edit
pr25754-1a.c

With GCC trunk, two binutils ld tests fail:
```
$ grep ^FAIL ld.log
FAIL: Run pr25754-1aa (-no-pie -fno-PIE -w)
FAIL: Run pr25754-1ba (-no-pie -fPIE -w)
```

test.sh:
```
#!/bin/bash
set -x

gcc -O3 -fno-PIE pr25754-1a.c -o pr25754-1a.o -c
gcc -fno-PIE pr25754-1b.s -o pr25754-1b.o -c
gcc -no-pie  -z noexecstack pr25754-1a.o pr25754-1b.o -o pr25754-1ba
./pr25754-1ba &> x.txt

grep -q "PASS" x.txt && exit 0

exit 1
```

It works with -O0.

Reply via email to