brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · f9f545e Raw
95 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3! Check errors from illegal (10.1.12 para 2) forward references4! in specification expressions to entities declared later in the5! same specification part.6 7module m18  integer :: m1j1, m1j2, m1j3, m1j49 contains10  subroutine s111    !ERROR: Forward reference to 'm1j1' is not allowed in the same specification part12    integer(kind=kind(m1j1)) :: t_s1m1j113    integer(kind=kind(m1s1j1)) :: t_s1j1 ! implicitly typed in s114    integer :: m1j1, m1s1j1, m1s1j2, m1s1j415    block16      !ERROR: Forward reference to 'm1j2' is not allowed in the same specification part17      integer(kind=kind(m1j2)) :: t_s1bm1j218      !ERROR: Forward reference to 'm1s1j2' is not allowed in the same specification part19      integer(kind=kind(m1s1j2)) :: t_s1bm1s1j220      !ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part21      integer(kind=kind(m1s1j3)) :: t_m1s1j3 ! m1s1j3 implicitly typed in s122      integer :: m1j2, m1s1j2, m1s1j323    end block24   contains25    subroutine s226      !ERROR: Forward reference to 'm1j3' is not allowed in the same specification part27      integer(kind=kind(m1j3)) :: t_m1j328      !ERROR: Forward reference to 'm1s1j3' is not allowed in the same specification part29      integer(kind=kind(m1s1j3)) :: t_m1s1j330      integer :: m1j3, m1s1j3, m1s2j131      block32        !ERROR: Forward reference to 'm1j4' is not allowed in the same specification part33        integer(kind=kind(m1j4)) :: t_m1j434        !ERROR: Forward reference to 'm1s1j4' is not allowed in the same specification part35        integer(kind=kind(m1s1j4)) :: t_m1s1j436        !ERROR: Forward reference to 'm1s2j1' is not allowed in the same specification part37        integer(kind=kind(m1s2j1)) :: t_m1s2j138        !ERROR: Forward reference to 'm1s2j2' is not allowed in the same specification part39        integer(kind=kind(m1s2j2)) :: t_m1s2j2 ! m1s2j2 implicitly typed in s240        integer :: m1j4, m1s1j4, m1s2j1, m1s2j241      end block42    end subroutine43  end subroutine44end module45 46module m247  implicit none48  integer :: m2j1, m2j2, m2j3, m2j449 contains50  subroutine s151    !ERROR: Forward reference to 'm2j1' is not allowed in the same specification part52    integer(kind=kind(m2j1)) :: t_s1m2j153    !ERROR: No explicit type declared for 'm2s1j1'54    integer(kind=kind(m2s1j1)) :: t_s1j155    integer :: m2j1, m2s1j1, m2s1j2, m2s1j456    block57      !ERROR: Forward reference to 'm2j2' is not allowed in the same specification part58      integer(kind=kind(m2j2)) :: t_s1bm2j259      !ERROR: Forward reference to 'm2s1j2' is not allowed in the same specification part60      integer(kind=kind(m2s1j2)) :: t_s1bm2s1j261      !ERROR: No explicit type declared for 'm2s1j3'62      integer(kind=kind(m2s1j3)) :: t_m2s1j363      integer :: m2j2, m2s1j2, m2s1j364    end block65   contains66    subroutine s267      !ERROR: Forward reference to 'm2j3' is not allowed in the same specification part68      integer(kind=kind(m2j3)) :: t_m2j369      !ERROR: No explicit type declared for 'm2s1j3'70      integer(kind=kind(m2s1j3)) :: t_m2s1j371      integer :: m2j3, m2s1j3, m2s2j172      block73        !ERROR: Forward reference to 'm2j4' is not allowed in the same specification part74        integer(kind=kind(m2j4)) :: t_m2j475        !ERROR: Forward reference to 'm2s1j4' is not allowed in the same specification part76        integer(kind=kind(m2s1j4)) :: t_m2s1j477        !ERROR: Forward reference to 'm2s2j1' is not allowed in the same specification part78        integer(kind=kind(m2s2j1)) :: t_m2s2j179        !ERROR: No explicit type declared for 'm2s2j2'80        integer(kind=kind(m2s2j2)) :: t_m2s2j281        integer :: m2j4, m2s1j4, m2s2j1, m2s2j282      end block83    end subroutine84  end subroutine85end module86 87! Case that elicited bad errors88SUBROUTINE KEEL89  INTEGER NODES90 CONTAINS91  SUBROUTINE SGEOM92    REAL :: RADIUS(nodes)93  END SUBROUTINE94END SUBROUTINE KEEL95