summaryrefslogtreecommitdiff
path: root/gcc/config/ia64
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2005-03-07 03:28:13 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2005-03-07 03:28:13 +0000
commit543144ed5d39a106fd0a68b3b3867c3f1859e524 (patch)
tree1249d5d3485455373cef4061fd3e55ab220027f8 /gcc/config/ia64
parent1eaea40908e7e9f4f2b6bb97bcf82a2e35fd6453 (diff)
downloadgcc-543144ed5d39a106fd0a68b3b3867c3f1859e524.tar.gz
hpux.h (LINK_SPEC): Add -z.
* config/ia64/hpux.h (LINK_SPEC): Add -z. * config/ia64/ia64.c (ia64_function_value): Return a REG not a PARALLEL for an empty structure. From-SVN: r96004
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r--gcc/config/ia64/hpux.h2
-rw-r--r--gcc/config/ia64/ia64.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h
index 5b4f0470f08..1618eb892b0 100644
--- a/gcc/config/ia64/hpux.h
+++ b/gcc/config/ia64/hpux.h
@@ -75,7 +75,7 @@ do { \
#undef LINK_SPEC
#define LINK_SPEC \
- "+Accept TypeMismatch \
+ "-z +Accept TypeMismatch \
%{shared:-b} \
%{!shared: \
-u main \
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index d67bb1f9620..bca447ba91a 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -3915,6 +3915,10 @@ ia64_function_value (tree valtype, tree func ATTRIBUTE_UNUSED)
offset = 0;
bytesize = int_size_in_bytes (valtype);
+ /* An empty PARALLEL is invalid here, but the return value
+ doesn't matter for empty structs. */
+ if (bytesize == 0)
+ return gen_rtx_REG (mode, GR_RET_FIRST);
for (i = 0; offset < bytesize; i++)
{
loc[i] = gen_rtx_EXPR_LIST (VOIDmode,