diff options
author | Sriraman Tallam <tmsriram@google.com> | 2014-07-09 00:50:25 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@gcc.gnu.org> | 2014-07-09 00:50:25 +0000 |
commit | dc58164b858733ba3e7628d8f4b11bc6a0c81657 (patch) | |
tree | ae90afd675e26f79ef09e8f055a0214d7fd79dd8 /gcc/config | |
parent | fcb090b2ccaa42ef09afca6b40e4d5bbbaaaf635 (diff) | |
download | gcc-dc58164b858733ba3e7628d8f4b11bc6a0c81657.zip gcc-dc58164b858733ba3e7628d8f4b11bc6a0c81657.tar.gz gcc-dc58164b858733ba3e7628d8f4b11bc6a0c81657.tar.bz2 |
re PR target/61599 ([x86_64] With -mcmodel=medium, extern global arrays without size are not treated conservatively.)
2014-07-08 Sriraman Tallam <tmsriram@google.com>
PR target/61599
* config/i386/i386.c (ix86_in_large_data_p): Check for size less
than zero.
PR target/61599
* gcc.target/i386/pr61599-1.c: New test.
* gcc.target/i386/pr61599-2.c: New test.
From-SVN: r212380
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/i386.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d29a25b..a280b46 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5039,8 +5039,11 @@ ix86_in_large_data_p (tree exp) HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); /* If this is an incomplete type with size 0, then we can't put it - in data because it might be too big when completed. */ - if (!size || size > ix86_section_threshold) + in data because it might be too big when completed. Also, + int_size_in_bytes returns -1 if size can vary or is larger than + an integer in which case also it is safer to assume that it goes in + large data. */ + if (size <= 0 || size > ix86_section_threshold) return true; } |