re PR fortran/32594 (substring simplification leads to ICE)
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tue, 14 Aug 2007 12:44:19 +0000 (12:44 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tue, 14 Aug 2007 12:44:19 +0000 (12:44 +0000)
commit9a251aa11803ceed2c52286f2b649b4d53a05dba
tree8db602af3b13c045381240aefc6106c915111741
parent9ef0c8d982bff201b518d99a900e7f7434ed33c9
re PR fortran/32594 (substring simplification leads to ICE)

PR fortran/32594

* trans-expr.c (gfc_conv_substring_expr): Only call
gfc_conv_substring if expr->ref is not NULL.
* expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
expression might be a constant.
(gfc_simplify_expr): Handle missing start and end, as well as
missing ref.

* gfortran.dg/substr_5.f90: New test.

From-SVN: r127478
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/substr_5.f90 [new file with mode: 0644]