1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Enforce limits on rank + corank
4 !ERROR: 'x' has rank 16, which is greater than the maximum supported rank 15
5 real :: x(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
6 !ERROR: 'y' has rank 16, which is greater than the maximum supported rank 15
7 real, allocatable
:: y(:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:)
8 !ERROR: 'z' has rank 16, which is greater than the maximum supported rank 15
9 real, pointer :: z(:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:)
10 !ERROR: 'w' has rank 16, which is greater than the maximum supported rank 15
11 real, dimension(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1) :: w
12 !ERROR: 'a' has rank 15 and corank 1, whose sum is greater than the maximum supported rank 15
13 real :: a(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)[*]
14 !ERROR: 'b' has rank 14 and corank 2, whose sum is greater than the maximum supported rank 15
15 real :: b(1,1,1,1,1,1,1,1,1,1,1,1,1,1)[1,*]
16 !ERROR: 'c' has rank 14 and corank 2, whose sum is greater than the maximum supported rank 15
18 dimension :: c(1,1,1,1,1,1,1,1,1,1,1,1,1,1)
21 !ERROR: 'foo' has rank 16, which is greater than the maximum supported rank 15
23 dimension :: foo(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
27 function bar() result(res
)
28 !ERROR: 'res' has rank 16, which is greater than the maximum supported rank 15
29 real :: res(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)