+2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77372
+ simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
+
2016-08-25 Steven g. Kargl <kargl@gcc.gnu.org>
PR fortran/77351
gfc_expr *
simplify_ieee_selected_real_kind (gfc_expr *expr)
{
- gfc_actual_arglist *arg = expr->value.function.actual;
- gfc_expr *p = arg->expr, *q = arg->next->expr,
- *rdx = arg->next->next->expr;
+ gfc_actual_arglist *arg;
+ gfc_expr *p = NULL, *q = NULL, *rdx = NULL;
+
+ arg = expr->value.function.actual;
+ p = arg->expr;
+ if (arg->next)
+ {
+ q = arg->next->expr;
+ if (arg->next->next)
+ rdx = arg->next->next->expr;
+ }
/* Currently, if IEEE is supported and this module is built, it means
all our floating-point types conform to IEEE. Hence, we simply handle
+2016-08-27 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/77372
+ gfortran.dg/pr77372.f90: New test.
+
2016-08-26 David Malcolm <dmalcolm@redhat.com>
* gcc.dg/spellcheck-fields-2.c (test): Move
--- /dev/null
+! { dg-do compile }
+program p
+ use ieee_arithmetic
+ real(kind=ieee_selected_real_kind(10_1)) :: z1
+ real(kind=ieee_selected_real_kind(10_2)) :: z2
+ real(kind=ieee_selected_real_kind(10_4)) :: z4
+end