Issue 98210
Summary Fortran submodule problem
Labels new issue
Assignees
Reporter 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
 ^^^^^
========================================

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to