Index: gcc/fortran/expr.c =================================================================== --- gcc/fortran/expr.c (revision 211685) +++ gcc/fortran/expr.c (working copy) @@ -1955,7 +1955,7 @@ scalarize_intrinsic_call (gfc_expr *e) for (; a; a = a->next) { n++; - if (a->expr->expr_type != EXPR_ARRAY) + if (!a->expr || a->expr->expr_type != EXPR_ARRAY) continue; array_arg = n; expr = gfc_copy_expr (a->expr); Index: gcc/testsuite/gfortran.dg/pr61454.f90 =================================================================== --- gcc/testsuite/gfortran.dg/pr61454.f90 (revision 0) +++ gcc/testsuite/gfortran.dg/pr61454.f90 (working copy) @@ -0,0 +1,14 @@ +! { dg-do compile } + + implicit none + integer, parameter :: arr(2) = [ 1, 3 ] + real, parameter :: arr2(2) = [ 1.5, 2.1 ] + integer, parameter :: j = int(sum(arr)) + integer, parameter :: k = ceiling(sum(arr2)) + real(kind=j) :: x1 + real(kind=k) :: x2 + + print *, j, k + print *, x1, x2 + + end