Issue |
60224
|
Summary |
[flang] Compilation error of explicit declaration of dummy argument
|
Labels |
new issue
|
Assignees |
|
Reporter |
ohno-fj
|
```
Version of flang-new : 16.0.0(77f2f34d696b77fe5bf05afbe7386966b6bcc8ba)
```
flang-new points out that there is no explicit type declaration of dummy argument.
The following are the test program, flang-new, gfortran and ifort compilation result.
snggm004_2.f90:
```fortran
PROGRAM main
IMPLICIT NONE
EXTERNAL sub1
INTEGER :: i1 = 1
integer :: j
CALL sub (sub1, i1)
print *,'OK'
END PROGRAM main
SUBROUTINE sub (routine, i)
IMPLICIT NONE
INTEGER, INTENT(IN ) :: i
CALL routine (i)
END SUBROUTINE sub
SUBROUTINE sub1 (ii)
IMPLICIT NONE
INTEGER, INTENT(IN ) :: ii
WRITE (6,*) ii
END SUBROUTINE sub1
```
```
$ flang-new -flang-experimental-exec snggm004_2.f90
error: Semantic errors in snggm004_2.f90
./snggm004_2.f90:10:17: error: No explicit type declared for 'routine'
SUBROUTINE sub (routine, i)
^^^^^^^
$
```
```
$ gfortran snggm004_2.f90
$
```
```
$ ifort snggm004_2.f90
$
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs