gcc/testsuite/gfortran.dg/function_optimize_6.f90
raw| 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 | |
| 15 |