public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Henderson <rth@redhat.com>
Subject: [PATCH] PR target/65064: Return false for COMMON symbols
Date: Sun, 15 Feb 2015 14:19:00 -0000	[thread overview]
Message-ID: <20150215141921.GA15368@gmail.com> (raw)

Hi,

r220674 exposed a bug in ia64_in_small_data_p.  After r220674, COMMON
symbols binds locally for executables.  But ia64_in_small_data_p returns
true for COMMON symbols which are never in small data section.  This patch
fixes it.  OK for trunk?

H.J.
----
Since COMMON symbols are never in small data section, ia64_in_small_data_p
should return false for COMMON symbols.

	PR target/65064
	* config/ia64/ia64.c (ia64_in_small_data_p): Return false for
	COMMON symbols.
---
 gcc/config/ia64/ia64.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 6ef22d9..3687289 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -9941,6 +9941,10 @@ ia64_in_small_data_p (const_tree exp)
   if (TARGET_NO_SDATA)
     return false;
 
+  /* COMMON symbols are never small data.  */
+  if (DECL_COMMON (exp))
+    return false;
+
   /* We want to merge strings, so we never consider them small data.  */
   if (TREE_CODE (exp) == STRING_CST)
     return false;
-- 
2.1.0

             reply	other threads:[~2015-02-15 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15 14:19 H.J. Lu [this message]
2015-02-18 13:18 ` H.J. Lu
2015-02-18 13:30   ` H.J. Lu
2015-02-18 17:19   ` Richard Henderson

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=20150215141921.GA15368@gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.com \
    /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: link
Be 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).