diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2014-06-19 11:58:55 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2014-06-19 11:58:55 +0000 |
commit | c8d599e1ddb1947d5c4c48a8c9aa45c52d9159a8 (patch) | |
tree | ae0fd06ff7bd79060722bf9fe934fcf47a945187 /gcc/fortran | |
parent | c7744b8eeae40c5979d079370b856ceb6b05f997 (diff) | |
download | gcc-c8d599e1ddb1947d5c4c48a8c9aa45c52d9159a8.zip gcc-c8d599e1ddb1947d5c4c48a8c9aa45c52d9159a8.tar.gz gcc-c8d599e1ddb1947d5c4c48a8c9aa45c52d9159a8.tar.bz2 |
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
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 2 |
2 files changed, 7 insertions, 1 deletions
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 <fxcoudert@gcc.gnu.org> + + PR fortran/61454 + * expr.c (scalarize_intrinsic_call): Take care of optional + arguments. + 2014-06-19 Tobias Burnus <burnus@net-b.de> * 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); |