2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / function_optimize_6.f90
blobcda7ab062838796fa39946dfe5c4c76826841f01
1 ! { dg-do compile }
2 ! { dg-options "-O -fdump-tree-original" }
3 ! PR 48405 - function elimnination in a DO loop should work.
4 program main
5 interface
6 pure function mypure()
7 integer :: mypure
8 end function mypure
9 end interface
10 DO I=1,mypure() + mypure()
11 ENDDO
12 END program main
13 ! { dg-final { scan-tree-dump-times "mypure" 1 "original" } }
14 ! { dg-final { cleanup-tree-dump "original" } }