summaryrefslogtreecommitdiff
path: root/gcc/config/ia64
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-18 17:24:20 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2015-02-18 17:24:20 +0000
commita21aaa7e03242573f5d3a3975240fd05b7462e49 (patch)
treee2d1353fd39cf4d43ed385621fd795bfd95a3d15 /gcc/config/ia64
parent99988a8c57586e547e055ad84d91e6439cfa3b94 (diff)
downloadgcc-a21aaa7e03242573f5d3a3975240fd05b7462e49.tar.gz
Return false for common symbols in sdata_symbolic_operand
Although common symbols are defined in executables, they aren't in small data section. But a definition in small data section overrides a common symbol, which still binds lcoally, and turns a reference to common symbol to reference to small data section. Even if ia64_in_small_data_p returns true on common symbols, sdata_symbolic_operand must return false on common symbols. Common symbols are assumed to be placed in small data section, but are accessed as if they are in normal data section so that they won't cause any relocation overflow. PR target/65064 * config/ia64/predicates.md (sdata_symbolic_operand): Return false for common symbols. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220792 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r--gcc/config/ia64/predicates.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/ia64/predicates.md b/gcc/config/ia64/predicates.md
index cba0efe7a6e..2aa7a780e02 100644
--- a/gcc/config/ia64/predicates.md
+++ b/gcc/config/ia64/predicates.md
@@ -69,7 +69,12 @@
of constants here. */
t = SYMBOL_REF_DECL (op);
if (DECL_P (t))
- t = DECL_SIZE_UNIT (t);
+ {
+ /* Common symbol isn't placed in small data section. */
+ if (DECL_COMMON (t))
+ return false;
+ t = DECL_SIZE_UNIT (t);
+ }
else
t = TYPE_SIZE_UNIT (TREE_TYPE (t));
if (t && tree_fits_shwi_p (t))