brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1023 B · 28613df Raw
47 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic2subroutine s13  integer x4  block5    import, none6    !ERROR: 'x' from host scoping unit is not accessible due to IMPORT7    x = 18  end block9end10 11subroutine s212  block13    import, none14    !ERROR: 'y' from host scoping unit is not accessible due to IMPORT15    y = 116  end block17end18 19subroutine s320  implicit none21  integer :: i, j22  block23    import, none24    !ERROR: No explicit type declared for 'i'25    real :: a(16) = [(i, i=1, 16)]26    real :: b(16)27    !ERROR: No explicit type declared for 'j'28    data(b(j), j=1, 16) / 16 * 0.0 /29  end block30end31 32subroutine s433  real :: j34  !ERROR: Must have INTEGER type, but is REAL(4)35  real :: a(16) = [(x, x=1, 16)]36  real :: b(16)37  !ERROR: Must have INTEGER type, but is REAL(4)38  data(b(j), j=1, 16) / 16 * 0.0 /39end40 41subroutine s542  implicit none43  data x/1./44  !PORTABILITY: 'x' appeared in a DATA statement before its type was declared under IMPLICIT NONE(TYPE) [-Wforward-ref-implicit-none-data]45  real x46end47