This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR target/65064: Return false for COMMON symbols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]