1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Miscellaneous constraint and requirement checking on intrinsics
4 real, dimension(5, 5) :: array
8 real, dimension(5, *) :: arg
9 !ERROR: A dim= argument is required for 'size' when the array is assumed-size
11 !ERROR: missing mandatory 'dim=' argument
13 !ERROR: The 'source=' argument to the intrinsic function 'shape' may not be assumed-size
15 ! But these cases are fine:
16 print *, size(arg
, dim
=1)
17 print *, ubound(arg
, dim
=1)
20 print *, ubound(array
)
21 print *, lbound(array
)
22 print *, size(arg(:,1))
23 print *, ubound(arg(:,1))
24 print *, shape(arg(:,1))