1 ! Copyright 2015-2022 Free Software Foundation, Inc.
3 ! This program is free software; you can redistribute it and/or modify
4 ! it under the terms of the GNU General Public License as published by
5 ! the Free Software Foundation; either version 3 of the License, or
6 ! (at your option) any later version.
8 ! This program is distributed in the hope that it will be useful,
9 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ! GNU General Public License for more details.
13 ! You should have received a copy of the GNU General Public License
14 ! along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ! Original file written by Jakub Jelinek <jakub@redhat.com> and
17 ! Jan Kratochvil <jan.kratochvil@redhat.com>.
18 ! Modified for the GDB testcases by Keven Boell <keven.boell@intel.com>.
20 subroutine foo (array1
, array2
)
21 integer :: array1 (:, :)
22 real :: array2 (:, :, :)
24 array1(:,:) = 5 ! not-filled
27 array2(:,:,:) = 6 ! array1-filled
30 array2(3,3,3) = 90 ! array2-almost-filled
33 subroutine bar (array1
, array2
)
35 integer :: array2 (4:9, 10:*)
40 array2(4,10) = array1(7)
41 array2(4,100) = array1(7)
47 subroutine foo (array1
, array2
)
48 integer :: array1 (:, :)
49 real :: array2 (:, :, :)
53 subroutine bar (array1
, array2
)
55 integer :: array2 (4:9, 10:*)
59 real, allocatable
:: vla1 (:, :, :)
60 integer, allocatable
:: vla2 (:, :)
63 integer :: sub_arr1(42, 42)
64 real :: sub_arr2(42, 42, 42)
65 integer :: sub_arr3(42)
67 sub_arr1(:,:) = 1 ! vla2-deallocated
71 call foo(sub_arr1
, sub_arr2
)
72 call foo(sub_arr1(5:10, 5:10), sub_arr2(10:15,10:15,10:15))
74 allocate (vla1 (10,10,10))
75 allocate (vla2 (20,20))
80 call bar(sub_arr3
, sub_arr1
)