hpux.h (LINK_SPEC): Add -z.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 7 Mar 2005 03:28:13 +0000 (03:28 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 7 Mar 2005 03:28:13 +0000 (03:28 +0000)
* 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

gcc/ChangeLog
gcc/config/ia64/hpux.h
gcc/config/ia64/ia64.c

index 451b7a2acfe39112ebf90022438a9cd05195d98c..2ca5db6c12c73c2e6880a0b84e195744501a4b9a 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-07  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * 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.
+
 2005-03-07  Kazu Hirata  <kazu@cs.umass.edu>
 
        * fold-const.c (fold_binary): Remove handling of RANGE_EXPR.
index 5b4f0470f0860df16956f0b2ac3e010706169d77..1618eb892b069e14861ed303f26bf140626d7040 100644 (file)
@@ -75,7 +75,7 @@ do {                                                  \
 
 #undef LINK_SPEC
 #define LINK_SPEC \
-  "+Accept TypeMismatch \
+  "-z +Accept TypeMismatch \
    %{shared:-b} \
    %{!shared: \
      -u main \
index d67bb1f9620af0f6d317d9026e8c486dbdcb636a..bca447ba91a3c3e342320aad830bab0b83d91d73 100644 (file)
@@ -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,