rs6000.c (rs6000_function_arg): Ensure type is non-NULL.
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 13 Dec 2018 19:25:59 +0000 (19:25 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Thu, 13 Dec 2018 19:25:59 +0000 (14:25 -0500)
* config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is non-NULL.
(rs6000_arg_partial_bytes): Same.

From-SVN: r267104

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 88db1c98c5045da0aea30f2fbe594ab8f2e9fd4a..a447c49e53d664b26828bff9b0694bd33ebec6c9 100644 (file)
@@ -1,3 +1,9 @@
+2018-12-13  David Edelsohn  <dje.gcc@gmail.com>
+
+       * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
+       non-NULL.
+       (rs6000_arg_partial_bytes): Same.
+
 2018-12-13  Jason Merrill  <jason@redhat.com>
 
        * gdbinit.in (pp): New macro.
index f774e2d0bf758e2c7eac6b9299d531c56c756814..88f4f620ae46b5e616cc587b911463e79b945979 100644 (file)
@@ -11999,7 +11999,8 @@ rs6000_function_arg (cumulative_args_t cum_v, machine_mode mode,
        cum->fregno++;
 
       if (USE_FP_FOR_ARG_P (cum, elt_mode)
-         && !(TARGET_AIX && !TARGET_ELF && AGGREGATE_TYPE_P (type)))
+         && !(TARGET_AIX && !TARGET_ELF
+              && type != NULL && AGGREGATE_TYPE_P (type)))
        {
          rtx rvec[GP_ARG_NUM_REG + AGGR_ARG_NUM_REG + 1];
          rtx r, off;
@@ -12136,7 +12137,8 @@ rs6000_arg_partial_bytes (cumulative_args_t cum_v, machine_mode mode,
   align_words = rs6000_parm_start (mode, type, cum->words);
 
   if (USE_FP_FOR_ARG_P (cum, elt_mode)
-      && !(TARGET_AIX && !TARGET_ELF && AGGREGATE_TYPE_P (type)))
+      && !(TARGET_AIX && !TARGET_ELF
+          && type != NULL && AGGREGATE_TYPE_P (type)))
     {
       unsigned long n_fpreg = (GET_MODE_SIZE (elt_mode) + 7) >> 3;