brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 8bec943 Raw
31 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12interface3  subroutine foo(a)4    real, device, dimension(:,:) :: a5  end6end interface7 8real, device, allocatable :: a(:,:)9complex, device, allocatable :: z(:,:)10integer :: i = 2, j = 311allocate(a(10,10))12allocate(z(10,10))13call foo(a) ! ok14call foo(a(:,:)) ! ok15call foo(a(1:10,1:10)) ! ok16!ERROR: actual argument associated with assumed shape/rank device dummy argument 'a=' is known to be discontiguous on its first dimension17call foo(a(1:10:2,1:10))18call foo(a(1:0:2,1:10)) ! empty dimension is ok19call foo(a(1:10:2,1:0)) ! any empty dimension is ok20call foo(a(1:10,1:10:2)) ! discontiguous second dimension is ok21!WARNING: actual argument associated with assumed shape/rank device dummy argument 'a=' is not known to be contiguous on its first dimension22call foo(a(1:10:i,1:10))23!WARNING: actual argument associated with assumed shape/rank device dummy argument 'a=' is not known to be contiguous on its first dimension24call foo(a(1:i:2,1:10))25call foo(a(i:j:1,1:10)) ! stride 1, okay, despite unknown bounds26!WARNING: actual argument associated with assumed shape/rank device dummy argument 'a=' is not known to be contiguous on its first dimension27call foo(a(i:j:-1,1:10))28!ERROR: actual argument associated with assumed shape/rank device dummy argument 'a=' is known to be discontiguous on its first dimension29call foo(z%re)30end31