Hello world, this patch fixes one part of PR 40628 by optimizing away an unneeded TRIM on string assignment. I have created a new file for this, optimize.c. This is supposed to contain optimizations with gfc_expr, before translations into TREEs. Chances are this file will grow a bit later :-) right now it only contains this single optimization. At a later stage, it might be a good idea to add a -fdump-optimized-tree to see what the optimization has done. Regression-tested on x86_64-unknown-linux-gnu. OK in principle for the idea? OK for trunk? Thomas 2010-06-18 Thomas Koenig * Make-lang.in: Add fortran/optimize.o. * gfortran.h: Add prototype for gfc_optimize_namespace. * trans-decl.c (gfc_generate_function_code): If optimizing, call gfc_optimize_namespace. * optimize.c: New file.