1! { dg-do compile } 2! { dg-additional-options "-fdump-tree-original -fcoarray=lib" } 3! 4! Check that we don't take twice the address of procedure simple_reduction 5! in the generated code. 6! 7! Contributed by Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> 8 9program simple_reduce 10 implicit none 11 12 integer :: me 13 14 me = this_image() 15 16 sync all 17 18 call co_reduce(me,simple_reduction) 19 20 write(*,*) this_image(),me 21 22contains 23 24 pure function simple_reduction(a,b) 25 integer,intent(in) :: a,b 26 integer :: simple_reduction 27 28 simple_reduction = a * b 29 end function simple_reduction 30 31end program simple_reduce 32 33! { dg-final { scan-tree-dump "_gfortran_caf_co_reduce \\(&desc\\.\\d+,\\s*simple_reduction," "original" } } 34