[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #5 from Andrew Pinski --- Dup. *** This bug has been marked as a duplicate of bug 84017 ***
[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027 --- Comment #4 from Michael Teske --- I found the fix for my problem: + 2018-02-05 Rainer Orth + + Backport from mainline + 2018-01-30 Rainer Orth + + PR bootstrap/84017 + * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86. + * configure: Regenerate. This fixes a different problem which I didn't have with 7.3.0 (bootstrap worked fine), but I just confirmed, that disabling gcc_cv_as_shf_merge did the trick. A broken ld explains my problem. From my side this bug can be closed.
[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027 --- Comment #3 from Michael Teske --- Another addition, I now tried the gcc-7 snapshot 20180531 and it is fixed here as well. I guess I'll used this one or wait for 7.3.1.
[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027 --- Comment #2 from Michael Teske --- Comparing the assembler output got my guess confirmed. The generated code on 7.3.0 starts with: .file "comperr.cpp" .text .section .gnu.linkonce.r._ZN19SystemCallExceptionC1EPKcl.str1.1,"aMS",@progbits,1 .LC0: .string "Exception: " .LC1: .string "\n" .LC2: .string "12" If I change the attributes of the first section in line 3 from .gnu.linkonce... to .section.rodata like it is on 8.1, the problem is gone.
[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027 --- Comment #1 from Michael Teske --- Interestingly it works fine with gcc 8.1.0 and ../configure --prefix=/opt/gcc-8.1.0-gas --with-gnu-as --with-as=/opt/csw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-gmp=/opt/csw --with-mpfr=/opt/csw --with-mpc=/opt/csw I retried with the same configure options and 7.3.0 just to be sure, and the problem still happens. So, it must have been fixed inbetween. Unfortunately, 8.1. is not yet an option for me.