xref: /llvm-project/flang/test/Evaluate/rewrite03.f90 (revision 6f5df4199e64020d9290838a72ba79b74ed91269)
1! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2! Tests rewrite of IS_CONTIGUOUS with TYPE(*) arguments.
3
4subroutine test_is_contiguous(assumed_size, assumed_shape, &
5      & assumed_shape_contiguous, assumed_rank, assumed_rank_contiguous)
6  type(*) :: assumed_size(*), assumed_shape(:), assumed_shape_contiguous(:)
7  type(*) :: assumed_rank(..), assumed_rank_contiguous(..)
8  contiguous :: assumed_shape_contiguous, assumed_rank_contiguous
9! CHECK: PRINT *, .true._4
10  print *, is_contiguous(assumed_size)
11! CHECK: PRINT *, .true._4
12  print *, is_contiguous(assumed_shape_contiguous)
13! CHECK: PRINT *, .true._4
14  print *, is_contiguous(assumed_rank_contiguous)
15! CHECK: PRINT *, is_contiguous(assumed_shape)
16  print *, is_contiguous(assumed_shape)
17! CHECK: PRINT *, is_contiguous(assumed_rank)
18  print *, is_contiguous(assumed_rank)
19end subroutine
20