1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic -Werror
2 ! Tests actual/dummy pointer argument shape mismatches
6 real, pointer, intent(in
) :: p
9 real, pointer, intent(in
) :: p(:)
12 real, pointer, intent(in
) :: p(..)
15 real, pointer :: a0
, a1(:)
16 call s0(null(a0
)) ! ok
17 !ERROR: Rank of dummy argument is 0, but actual argument has rank 1
18 !ERROR: Rank of pointer is 0, but function result has rank 1
20 !ERROR: Rank of dummy argument is 1, but actual argument has rank 0
21 !ERROR: Rank of pointer is 1, but function result has rank 0
23 call s1(null(a1
)) ! ok
24 call sa(null(a0
)) ! ok
25 call sa(null(a1
)) ! ok
26 !ERROR: NULL() without MOLD= must not be associated with an assumed-rank dummy argument
28 !ERROR: NULL() without MOLD= must not be associated with an assumed-rank dummy argument