-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fortran submodule problem #98210
Comments
@llvm/issue-subscribers-flang-frontend Author: None (mfvalin)
> cat ignore_tkr.F90
module machin
implicit none
interface ignore1
module subroutine ignore1(array)
implicit none
integer, dimension(*) :: array
#if defined(IGNORE)
!DIR$ ignore_tkr array
#endif
end
end interface
end module
> cat truc.F90
submodule(machin) truc
use machin
implicit none
contains
module procedure ignore1
implicit none
call tagada1(array)
end
end submodule
======================================
> flang-new -c ignore_tkr.F90
[software@nemesis ~/GITHUB-ECCC/librmn/build : (dev_alpha *%|u=)]
> flang-new -c truc.F90
error: Semantic errors in truc.F90
./truc.F90:2:7: error: Module 'machin' cannot USE itself
use machin
^^^^^^
./truc.F90:2:7: error: Cannot use-associate 'ignore1'; it is already declared in this scope
use machin
^^^^^^
./truc.F90:5:20: Previous declaration of 'ignore1'
module procedure ignore1
^^^^^^^
=====================================
> flang-new -c ignore_tkr.F90 -DIGNORE
error: Semantic errors in ignore_tkr.F90
./ignore_tkr.F90:6:30: error: !DIR$ IGNORE_TKR may apply only in an interface or a module procedure
integer, dimension(*) :: array
^^^^^
========================================
|
delete the USE statement; the error on it is valid, and the later errors are consequences of it |
removing the use statement solves the first issue, thank you. the ignore_tkr issue remains (compiling with -DIGNORE) |
I'll check that out. |
We emit an incorrect error message when !DIR$ IGNORE_TKR appears in a separate module procedure's interface declaration. Fixes llvm#98210.
) We emit an incorrect error message when !DIR$ IGNORE_TKR appears in a separate module procedure's interface declaration. Fixes #98210.
…m#98374) We emit an incorrect error message when !DIR$ IGNORE_TKR appears in a separate module procedure's interface declaration. Fixes llvm#98210.
The text was updated successfully, but these errors were encountered: