From: David Edelsohn Date: Thu, 13 Dec 2018 19:25:59 +0000 (+0000) Subject: rs6000.c (rs6000_function_arg): Ensure type is non-NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab0cdfdd97602ae1fc24b02d506c58e82f19ab63;p=gcc.git rs6000.c (rs6000_function_arg): Ensure type is non-NULL. * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is non-NULL. (rs6000_arg_partial_bytes): Same. From-SVN: r267104 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 88db1c98c50..a447c49e53d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-12-13 David Edelsohn + + * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is + non-NULL. + (rs6000_arg_partial_bytes): Same. + 2018-12-13 Jason Merrill * gdbinit.in (pp): New macro. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f774e2d0bf7..88f4f620ae4 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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;