diff options
author | arphaman <arphaman@gmail.com> | 2013-08-11 13:45:29 +0100 |
---|---|---|
committer | arphaman <arphaman@gmail.com> | 2013-08-11 13:45:29 +0100 |
commit | 0ca54f7f6c65957892234b688400880980e3da9d (patch) | |
tree | cc5cbeab89f5c5530746a37e174650c1e60bf0d5 /test | |
parent | 3c020f611756357bffd47764fa7bdbc111f5e802 (diff) | |
download | flang-0ca54f7f6c65957892234b688400880980e3da9d.tar.gz |
improved sema for argument-dependent array bound specifiers
Diffstat (limited to 'test')
-rw-r--r-- | test/Sema/arraySpec.f95 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Sema/arraySpec.f95 b/test/Sema/arraySpec.f95 index 763468f7a8..e641e76071 100644 --- a/test/Sema/arraySpec.f95 +++ b/test/Sema/arraySpec.f95 @@ -11,11 +11,15 @@ SUBROUTINE SUB(ARR, ARR2, ARR3) i = ARR3(3,2) ! CHECK: i = int(arr3(3, 2)) END -SUBROUTINE BUS(L, ARR, ARR2) - INTEGER L +SUBROUTINE BUS(L, J, A, ARR, ARR2, ARR3, ARR4, ARR5) + INTEGER L, J INTEGER I + REAL A REAL ARR2(L) DIMENSION ARR(L) + REAL ARR3(L+J+1) + REAL ARR4(L+A) ! expected-error {{array specifier requires an integer argument ('real' invalid)}} + REAL ARR5(L+I) ! expected-error {{expected a constant expression}} ! ARR is REAL by implicit I = ARR(1) ! CHECK: i = int(arr(1)) |