re PR fortran/47065 (Replace trim(a) by a(1:len_trim(a)))
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 31 Dec 2010 11:32:16 +0000 (11:32 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 31 Dec 2010 11:32:16 +0000 (11:32 +0000)
commit4afeb65c3248e4ece2720ea616d9333bdedaf5ff
treedce0054aa68fea712fe3f1b5b0444415fe2541ad
parent7c1a49fa1b2535dcce600d03887e2c72a463cc2c
re PR fortran/47065 (Replace trim(a) by a(1:len_trim(a)))

2010-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/47065
* frontend-passes.c (count_arglist):  Static variable to
count the nesting of argument lists.
(optimize_code):  Set count_arglist to 1 if within a call
statement, to 0 otherwise.
(optimize_trim):  New function.
(optimize_expr):  Adjust count_arglist.  Call optimize_trim.

2010-12-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/47065
* gfortran.dg/trim_optimize_3.f90:  New test.
* gfortran.dg/trim_optimize_4.f90:  New test.

From-SVN: r168367
gcc/fortran/ChangeLog
gcc/fortran/frontend-passes.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/trim_optimize_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/trim_optimize_4.f90 [new file with mode: 0644]