aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2008-01-05 16:47:50 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2008-01-05 16:47:50 +0000
commit2a4430a6f9c0339813e1ba3031e9d86257361ac9 (patch)
tree5202a4654ed71e340888c7db112f4f6431a1072f /gcc
parent2fd7985e1b93cf37c020a0a9820dd296d45e9fd6 (diff)
downloadgcc-2a4430a6f9c0339813e1ba3031e9d86257361ac9.zip
gcc-2a4430a6f9c0339813e1ba3031e9d86257361ac9.tar.gz
gcc-2a4430a6f9c0339813e1ba3031e9d86257361ac9.tar.bz2
mips.c (mips_in_small_data_p): Reinstate size > 0 check.
gcc/ * config/mips/mips.c (mips_in_small_data_p): Reinstate size > 0 check. From-SVN: r131339
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/mips/mips.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 49d0a96..570f269 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-05 Richard Sandiford <rsandifo@nildram.co.uk>
+
+ * config/mips/mips.c (mips_in_small_data_p): Reinstate size > 0 check.
+
2008-01-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/34618
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index b81029e..1aa907a 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -6677,8 +6677,10 @@ mips_in_small_data_p (const_tree decl)
return false;
}
+ /* We have traditionally not treated zero-sized objects as small data,
+ so this is now effectively part of the ABI. */
size = int_size_in_bytes (TREE_TYPE (decl));
- return size <= mips_small_data_threshold;
+ return size > 0 && size <= mips_small_data_threshold;
}
/* Implement TARGET_USE_ANCHORS_FOR_SYMBOL_P. We don't want to use