From c8d599e1ddb1947d5c4c48a8c9aa45c52d9159a8 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Thu, 19 Jun 2014 11:58:55 +0000 Subject: re PR fortran/61454 (ICE in simplification of initialization expression with array) PR fortran/61454 * expr.c (scalarize_intrinsic_call): Take care of optional arguments. * gfortran.dg/pr61454.f90: New file. From-SVN: r211822 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/expr.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 903e9ab..6325c50 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2014-06-19 Francois-Xavier Coudert + + PR fortran/61454 + * expr.c (scalarize_intrinsic_call): Take care of optional + arguments. + 2014-06-19 Tobias Burnus * trans-intrinsic.c (conv_co_minmaxsum): Fix argument diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index f677204..f0238c1 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -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); -- cgit v1.1