diff options
author | Nick Clifton <nickc@cambridge.redhat.com> | 2001-11-05 17:00:45 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2001-11-05 17:00:45 +0000 |
commit | e529bd42ef74c83959a86799d866be203c8669b7 (patch) | |
tree | 7fa48a62fb25430d93e9e1b2c8732ac79451e879 | |
parent | 648f5f0435aa856f1239985229c995c28529acc9 (diff) | |
download | gcc-e529bd42ef74c83959a86799d866be203c8669b7.zip gcc-e529bd42ef74c83959a86799d866be203c8669b7.tar.gz gcc-e529bd42ef74c83959a86799d866be203c8669b7.tar.bz2 |
Cope with int_size_in_bytes returning -1.
From-SVN: r46788
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 95be507..f19be35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2001-11-05 Nick Clifton <nickc@cambridge.redhat.com> + * config/arm/arm.c (arm_return_in_memory): Cope with + int_size_in_bytes returning -1. + * config/arm/unknown-elf.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Handle DECL being NULL. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0475c58..a394a97 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1729,9 +1729,11 @@ arm_return_in_memory (type) /* For the arm-wince targets we choose to be compitable with Microsoft's ARM and Thumb compilers, which always return aggregates in memory. */ #ifndef ARM_WINCE - - if (int_size_in_bytes (type) > 4) - /* All structures/unions bigger than one word are returned in memory. */ + /* All structures/unions bigger than one word are returned in memory. + Also catch the case where int_size_in_bytes returns -1. In this case + the aggregate is either huge or of varaible size, and in either case + we will want to return it via memory and not in a register. */ + if (((unsigned int) int_size_in_bytes (type)) > UNITS_PER_WORD) return 1; if (TREE_CODE (type) == RECORD_TYPE) |