You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of flang-new : 19.0.0(4f19f15a601a5761b12c9c66d99d97dbc89ef90d)/AArch64
When a function defined in module and a statement function used in an internal subroutine have the same name, a compilation error occurs.
The following are the test program, Flang-new, Gfortran and ifort compilation/execution result.
sngg657d_2.f90:
module m1
containsfunctionifun() result(r)
r=0endfunction ifun
end module m1
program main
use m1
call test03
print*,'pass'containssubroutinetest03()
ifun()=1if (ifun()/=1) print*,101endsubroutine test03end program main
$ flang-new sngg657d_2.f90; ./a.out
error: Semantic errors in sngg657d_2.f90
./sngg657d_2.f90:14:5: error: 'ifun' has not been declared as an array or pointer-valued function
ifun()=1
^^^^
$