aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/m68hc11
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2004-02-06 05:55:07 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2004-02-06 05:55:07 +0000
commit78bc94a2a8a20a2c3443d42b04cd4d8486f2ed41 (patch)
tree747192e9ce04e2e116aa37e5fc0323f98c4339f1 /gcc/config/m68hc11
parentd8c2bed3d823707b2b725344b272ae02011b89ed (diff)
downloadgcc-78bc94a2a8a20a2c3443d42b04cd4d8486f2ed41.zip
gcc-78bc94a2a8a20a2c3443d42b04cd4d8486f2ed41.tar.gz
gcc-78bc94a2a8a20a2c3443d42b04cd4d8486f2ed41.tar.bz2
arc.c (arc_return_in_memory): Check the return value of int_size_in_bytes against -1.
* config/arc/arc.c (arc_return_in_memory): Check the return value of int_size_in_bytes against -1. Don't check TREE_ADDRESSABLE. * config/avr/avr.c (avr_return_in_memory): Check the return value of int_size_in_bytes against -1. * config/ip2k/ip2k.c (ip2k_return_in_memory): Likewise. * config/m68hc11/m68hc11.c (m68hc11_return_in_memory): Likewise. * config/mcore/mcore.c (mcore_return_in_memory): Likewise. * config/stormy16/stormy16.c (xstormy16_return_in_memory): Likewise. From-SVN: r77377
Diffstat (limited to 'gcc/config/m68hc11')
-rw-r--r--gcc/config/m68hc11/m68hc11.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index c430421..e5bca2e 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -5550,9 +5550,13 @@ m68hc11_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
static bool
m68hc11_return_in_memory (tree type, tree fntype ATTRIBUTE_UNUSED)
{
- return ((TYPE_MODE (type) == BLKmode)
- ? (int_size_in_bytes (type) > 4)
- : (GET_MODE_SIZE (TYPE_MODE (type)) > 4));
+ if (TYPE_MODE (type) == BLKmode)
+ {
+ HOST_WIDE_INT size = int_size_in_bytes (type);
+ return (size == -1 || size > 4);
+ }
+ else
+ return GET_MODE_SIZE (TYPE_MODE (type)) > 4;
}
#include "gt-m68hc11.h"