1 ! Copyright 2015-2016 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 2 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, write to the Free Software
15 ! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 ! Original file written by Jakub Jelinek <jakub@redhat.com> and
18 ! Jan Kratochvil <jan.kratochvil@redhat.com>.
19 ! Modified for the GDB testcases by Keven Boell <keven.boell@intel.com>.
21 subroutine foo (array1, array2)
22 integer :: array1 (:, :)
23 real :: array2 (:, :, :)
25 array1(:,:) = 5 ! not-filled
28 array2(:,:,:) = 6 ! array1-filled
31 array2(3,3,3) = 90 ! array2-almost-filled
34 subroutine bar (array1, array2)
36 integer :: array2 (4:9, 10:*)
41 array2(4,10) = array1(7)
42 array2(4,100) = array1(7)
48 subroutine foo (array1, array2)
49 integer :: array1 (:, :)
50 real :: array2 (:, :, :)
54 subroutine bar (array1, array2)
56 integer :: array2 (4:9, 10:*)
60 real, allocatable :: vla1 (:, :, :)
61 integer, allocatable :: vla2 (:, :)
64 integer :: sub_arr1(42, 42)
65 real :: sub_arr2(42, 42, 42)
66 integer :: sub_arr3(42)
68 sub_arr1(:,:) = 1 ! vla2-deallocated
72 call foo(sub_arr1, sub_arr2)
73 call foo(sub_arr1(5:10, 5:10), sub_arr2(10:15,10:15,10:15))
75 allocate (vla1 (10,10,10))
76 allocate (vla2 (20,20))
81 call bar(sub_arr3, sub_arr1)