Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/implied_shape_5.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 ! { dg-do compile } | |
2 ! | |
3 ! PR fortran/68020 | |
4 ! | |
5 ! Reject mixing explicit-shape and implied-shape arrays | |
6 ! | |
7 subroutine rank_1_2 | |
8 integer, parameter :: a(1, 2) = 0 | |
9 integer, parameter :: y(11:11, 12:*) = a ! { dg-error "Assumed size array at .1. must be a dummy argument" } | |
10 integer, parameter :: x(:, *) = a ! { dg-error "Bad specification for deferred shape array" } | |
11 end | |
12 | |
13 subroutine rank_3 | |
14 integer, parameter :: a(1, 2, 3) = 0 | |
15 integer, parameter :: y(11:*, 12:14, 13:*) = a ! { dg-error "Bad specification for assumed size array" } | |
16 integer, parameter :: x(11:*, :, 13:*) = a ! { dg-error "Bad specification for assumed size array" } | |
17 end | |
18 | |
19 subroutine rank_4 | |
20 integer, parameter :: a(1, 2, 3, 4) = 0 | |
21 integer, parameter :: y(11:*, 12:*, 13:*, 14:17) = a ! { dg-error "Bad array specification for implied-shape array" } | |
22 integer, parameter :: y(11:*, 12:*, 13:*, 14:) = a ! { dg-error "Bad array specification for implied-shape array" } | |
23 end | |
24 | |
25 program p | |
26 call rank_1_2 | |
27 call rank_3 | |
28 call rank_4 | |
29 end program p |