aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 05eaf24..f657463 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1149,7 +1149,17 @@ compute_record_mode (type)
#ifdef MEMBER_TYPE_FORCES_BLK
/* With some targets, eg. c4x, it is sub-optimal
to access an aligned BLKmode structure as a scalar. */
- if (mode == VOIDmode && MEMBER_TYPE_FORCES_BLK (field))
+
+ /* On ia64-*-hpux we need to ensure that we don't change the
+ mode of a structure containing a single field or else we
+ will pass it incorrectly. Since a structure with a single
+ field causes mode to get set above we can't allow the
+ check for mode == VOIDmode in this case. Perhaps
+ MEMBER_TYPE_FORCES_BLK should be extended to include mode
+ as an argument and the check could be put in there for c4x. */
+
+ if ((mode == VOIDmode || FUNCTION_ARG_REG_LITTLE_ENDIAN)
+ && MEMBER_TYPE_FORCES_BLK (field))
return;
#endif /* MEMBER_TYPE_FORCES_BLK */
}