[Bug target/86027] string literals get corrupted with -O3 and gas on solaris i386
subscribe at teskor dot de
gcc-bugzilla@gcc.gnu.org
Mon Jun 4 08:23:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86027
--- Comment #2 from Michael Teske <subscribe at teskor dot de> ---
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.
More information about the Gcc-bugs
mailing list