- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
problem with Fortran submodules
when compiling the following code with -DWITH_VALUE
$ flang problem.F90 -DWITH_VALUE && ./a.out
F90-S-0038-Symbol, input, has not been explicitly declared (problem.F90)
0 inform, 0 warnings, 1 severes, 0 fatal for subroutine_017
$ cat problem.F90
module module_017
implicit none
interface sub_017
module subroutine subroutine_017(input) ! interface defined here, body will be found in a submodule
implicit none
#if defined(WITH_VALUE)
integer, intent(IN), value :: input
#else
integer, intent(IN) :: input
#endif
end
end interface
end module
submodule (module_017) submodule_017 ! submodule whose parent is module_017
implicit none ! generates an error with some compilers with -DWITH_VALUE
contains
module procedure subroutine_017
print *,'subroutine_017 : input =', input
end
end submodule
program demo_017
use module_017
call sub_017(123)
end
$ flang problem.F90 && ./a.out
subroutine_017 : input = 123
(the nvidia nvfortran compiler exhibits the same problem)
(problem has been reported to nvidia)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mfvalin,
Thanks for reporting this issue. I have filed a bug report for this issue. Will keep you posted on the progress of the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello mfvalin,
Thanks for reporting this issue. I have filed a bug report for this issue. Will keep you posted on the progress of the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @mfvalin
The above reported issue is fixed in AOCC-4.1.0 compiler.
Download Link : https://www.amd.com/en/developer/aocc.html
Please feel free to reach out if you face any issues.
