re PR fortran/31725 ([4.1 only] substring bound evaluated multiple times: wrong code...
authorFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 14 May 2007 19:29:33 +0000 (19:29 +0000)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Mon, 14 May 2007 19:29:33 +0000 (19:29 +0000)
commit1af5627c40801eb1715b9ac1eadff50d1de46288
tree881664a2a668dabf5b889bcf482119a96600fb05
parent9c40feebdbb2bf7edd0dc43709ea47de67130a59
re PR fortran/31725 ([4.1 only] substring bound evaluated multiple times: wrong code for string(function():) = 'X')

PR fortran/31725

* trans-expr.c (gfc_conv_substring): Evaluate substring bounds
only once.

* gfortran.dg/substr_4.f: New test.

From-SVN: r124720
gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/substr_4.f [new file with mode: 0644]