Commit 82358e09 by Thomas Koenig

re PR fortran/48405 (Handle expressions in DO loops for front-end optimization)

2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/48405
	* frontend_passes (cfe_register_funcs): Remove workaround for DO
	loops.
	(gfc_code_walker):  Make sure the pointer to the current
	statement doen't change when other statements are inserted.

2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/48405
	* gfortran.dg/function_optimize_6.f90:  New test.

From-SVN: r172838
parent 6ddfda8a
2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48405
* frontend_passes (cfe_register_funcs): Remove workaround for DO
loops.
(gfc_code_walker): Make sure the pointer to the current
statement doen't change when other statements are inserted.
2011-04-21 Tobias Burnus <burnus@net-b.de>
PR fortran/18918
......
2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/48405
* gfortran.dg/function_optimize_6.f90: New test.
2011-04-21 Easwaran Raman <eraman@google.com>
* gcc.dg/stack-layout-2.c: New test.
......
! { dg-do compile }
! { dg-options "-O -fdump-tree-original" }
! PR 48405 - function elimnination in a DO loop should work.
program main
interface
pure function mypure()
integer :: mypure
end function mypure
end interface
DO I=1,mypure() + mypure()
ENDDO
END program main
! { dg-final { scan-tree-dump-times "mypure" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment