comparison flang/test/Semantics/modfile25.f90 @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 0572611fdcc8
children 5f17cb93ff66
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
1 ! RUN: %S/test_modfile.sh %s %t %f18 1 ! RUN: %S/test_modfile.sh %s %t %flang_fc1
2 ! Test compile-time analysis of shapes. 2 ! Test compile-time analysis of shapes.
3 3
4 module m1 4 module m1
5 integer(8), parameter :: a0s(*) = shape(3.14159) 5 integer(8), parameter :: a0s(*) = shape(3.14159)
6 real :: a1(5,5,5) 6 real :: a1(5,5,5)
20 contains 20 contains
21 subroutine subr(x,n1,n2) 21 subroutine subr(x,n1,n2)
22 real, intent(in) :: x(:,:) 22 real, intent(in) :: x(:,:)
23 integer, intent(in) :: n1(3), n2(:) 23 integer, intent(in) :: n1(3), n2(:)
24 real, allocatable :: a(:,:,:) 24 real, allocatable :: a(:,:,:)
25 ! the following fail if we don't handle empty strings
26 Character(0) :: ch1(1,2,3) = Reshape([('',n=1,1*2*3)],[1,2,3])
27 Character(0) :: ch2(3) = reshape(['','',''], [3])
25 a = reshape(x,n1) 28 a = reshape(x,n1)
26 a = reshape(x,n2(10:30:9)) ! fails if we can't figure out triplet shape 29 a = reshape(x,n2(10:30:9)) ! fails if we can't figure out triplet shape
27 end subroutine 30 end subroutine
28 end module m1 31 end module m1
29 !Expect: m1.mod 32 !Expect: m1.mod