http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48448
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-04-08 21:46:11 UTC --- Author: tkoenig Date: Fri Apr 8 21:46:08 2011 New Revision: 172215 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172215 Log: 2011-04-08 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/48448 * gfortran.h (gfc_option_t): Add warn_function_elimination and flag_frontend_optimize. * lang.opt (Wfunction-elimination): Add. (ffrontend-optimize): Add. * invoke.texi: Add documentation for -Wfunction-elimination and -ffrontend-optimize. Add -faggressive-function-elimination to list of code generation options. * frontend-passes.c (gfc_run_passes): Run optimizations if flag_frontend_optimize is set. (warn_function_elimination): New function. (cfe_expr_0): Call it if requested to do so. * options.c (gfc_init_options): Initiate warn_function_elimination and flag_frontend_optimize. (gfc_post_options): Set flag_frontend_optimize if not specified by user, depending on the optimization level. (gfc_handle_option): Handle -Wfunction-elimination and -ffrontend-optimize. 2011-04-08 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/48448 * gfortran.dg/function_optimize_5.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/function_optimize_5.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/frontend-passes.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/invoke.texi trunk/gcc/fortran/lang.opt trunk/gcc/fortran/options.c trunk/gcc/testsuite/ChangeLog