public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59777] New: Incorrect expansion of TLS arguments in a call Date: Sun, 12 Jan 2014 18:10:00 -0000 [thread overview] Message-ID: <bug-59777-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59777 Bug ID: 59777 Summary: Incorrect expansion of TLS arguments in a call Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org Host: hppa-unknown-linux-gnu Target: hppa-unknown-linux-gnu Build: hppa-unknown-linux-gnu Created attachment 31813 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31813&action=edit Testcase. The attached testcase shows the problem. Argument expressions containing a TLS symbol reference need to be precomputed as a call may be needed to legitimize the address and this may clobber the setup for earlier arguments causing wrong code. For example, compilation of the testcase with: gcc-4.8 -fPIC -DPIC -W -Wall -Wextra -Wshadow -Wformat -Wundef -D_GNU_SOURCE -O0 cap-ng.c -fPIC -DPIC -o cap-ng results in the following output: $ ./cap-ng cc m.hdr1 = 0x400015c8 pidaaaa = 0 There seems to be some attempt to handle this in precompute_register_parameters().
next reply other threads:[~2014-01-12 18:10 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-12 18:10 danglin at gcc dot gnu.org [this message] 2014-01-12 18:13 ` [Bug middle-end/59777] " danglin at gcc dot gnu.org 2014-02-05 0:47 ` [Bug target/59777] " danglin at gcc dot gnu.org 2014-02-05 1:02 ` danglin at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59777-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).