1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test warnings and errors about DIM= arguments to transformational intrinsics
7 real, intent(in
) :: a(:)
8 !ERROR: The value of DIM= (-1) may not be less than 1
12 real, intent(in
) :: a(:)
13 !ERROR: The value of DIM= (2) may not be greater than 1
17 real, intent(in
) :: a(:)
18 integer, optional
, intent(in
) :: d
19 !PORTABILITY: The actual argument for DIM= is optional, pointer, or allocatable, and it is assumed to be present and equal to 1 at execution time
23 real, intent(in
) :: a(:)
24 integer, pointer, intent(in
) :: d
25 !PORTABILITY: The actual argument for DIM= is optional, pointer, or allocatable, and it is assumed to be present and equal to 1 at execution time
29 real, intent(in
) :: a(:)
30 integer, allocatable
, intent(in
) :: d
31 !PORTABILITY: The actual argument for DIM= is optional, pointer, or allocatable, and it is assumed to be present and equal to 1 at execution time
35 real, intent(in
) :: a(:,:)
36 real, allocatable
:: f10a(:)
37 !ERROR: The value of DIM= (-1) may not be less than 1
41 real, intent(in
) :: a(:,:)
42 real, allocatable
:: f10b(:)
43 !ERROR: The value of DIM= (3) may not be greater than 2
47 real, intent(in
) :: a(:,:)
48 integer, optional
, intent(in
) :: d
49 real, allocatable
:: f11(:)
50 !WARNING: The actual argument for DIM= is optional, pointer, or allocatable, and may not be absent during execution; parenthesize to silence this warning
54 real, intent(in
) :: a(:,:)
55 integer, pointer, intent(in
) :: d
56 real, allocatable
:: f12(:)
57 !WARNING: The actual argument for DIM= is optional, pointer, or allocatable, and may not be absent during execution; parenthesize to silence this warning
61 real, intent(in
) :: a(:,:)
62 integer, allocatable
, intent(in
) :: d
63 real, allocatable
:: f13(:)
64 !WARNING: The actual argument for DIM= is optional, pointer, or allocatable, and may not be absent during execution; parenthesize to silence this warning