public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/94542] New: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 @ 2020-04-09 17:09 acsawdey at gcc dot gnu.org 2020-04-09 17:13 ` [Bug target/94542] " acsawdey at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: acsawdey at gcc dot gnu.org @ 2020-04-09 17:09 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94542 Bug ID: 94542 Summary: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acsawdey at gcc dot gnu.org Target Milestone: --- The test case is: __thread double thrtest[81]; int main () { double *p, *e; e = &thrtest[81]; for (p = &thrtest[0]; p < e; ++p) *p = 1.0; return 0; } Generated code for p and e is paddi 9,13,thrtest@tprel pla 8,thrtest+648@pcrel The second should also be using a @tprel relocation. Because it didn't, the loop runs off the end of allocated memory and segfaults. This test runs correctly when compiled with -O0. Compile command: /home2/sawdey/work/gcc/mamboCI/build-mambo/gcc/xgcc -B/home2/sawdey/work/gcc/mamboCI/build-mambo/gcc/ /home2/sawdey/work/gcc/mamboCI/pike-trunk/gcc/testsuite/gcc.dg/tls/pr24428-2.c -O2 -mpcrel -mcpu=future -S -o pr24428-2.exe.s ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/94542] test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 2020-04-09 17:09 [Bug target/94542] New: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 acsawdey at gcc dot gnu.org @ 2020-04-09 17:13 ` acsawdey at gcc dot gnu.org 2020-04-14 19:41 ` cvs-commit at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: acsawdey at gcc dot gnu.org @ 2020-04-09 17:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94542 acsawdey at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |acsawdey at gcc dot gnu.org Status|UNCONFIRMED |NEW Last reconfirmed| |2020-04-09 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/94542] test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 2020-04-09 17:09 [Bug target/94542] New: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 acsawdey at gcc dot gnu.org 2020-04-09 17:13 ` [Bug target/94542] " acsawdey at gcc dot gnu.org @ 2020-04-14 19:41 ` cvs-commit at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2020-04-14 19:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94542 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aaron Sawdey <acsawdey@gcc.gnu.org>: https://gcc.gnu.org/g:aba6453890ce1754b7d1c01a67612766690ff15e commit r10-7722-gaba6453890ce1754b7d1c01a67612766690ff15e Author: Aaron Sawdey <acsawdey@linux.ibm.com> Date: Tue Apr 14 14:38:47 2020 -0500 Fix for PR/94542, do not make TLS refs PC-relative For rs6000 target, it is not valid to make PC-relative references to TLS symbols. So addr_to_insn_form() needs to check if things are TLS before returning PC-rel forms. 2020-04-14 Aaron Sawdey <acsawdey@linux.ibm.com> PR target/94542 * config/rs6000/rs6000.c (address_to_insn_form): Do not attempt to use PC-relative addressing for TLS references. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/94542] test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 2020-04-09 17:09 [Bug target/94542] New: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 acsawdey at gcc dot gnu.org 2020-04-09 17:13 ` [Bug target/94542] " acsawdey at gcc dot gnu.org 2020-04-14 19:41 ` cvs-commit at gcc dot gnu.org @ 2021-05-04 12:32 ` rguenth at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2021-05-04 12:32 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94542 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-04 12:32 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-09 17:09 [Bug target/94542] New: test gcc/testsuite/gcc.dg/tls/pr24428-2.c generates incorrect code on ppc64le with -mpcrel -mcpu=future -O2 acsawdey at gcc dot gnu.org 2020-04-09 17:13 ` [Bug target/94542] " acsawdey at gcc dot gnu.org 2020-04-14 19:41 ` cvs-commit at gcc dot gnu.org 2021-05-04 12:32 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).