Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / vla-datatypes.f90
CommitLineData
88b9d363 1! Copyright 2015-2022 Free Software Foundation, Inc.
3f2f83dd
KB
2!
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.
7!
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.
12!
13! You should have received a copy of the GNU General Public License
1cc75e92 14! along with this program. If not, see <http://www.gnu.org/licenses/>.
3f2f83dd
KB
15
16program vla_primitives
17 integer, allocatable :: intvla(:, :, :)
18 real, allocatable :: realvla(:, :, :)
19 complex, allocatable :: complexvla(:, :, :)
20 logical, allocatable :: logicalvla(:, :, :)
21 character, allocatable :: charactervla(:, :, :)
22 logical :: l
23
24 allocate (intvla (11,22,33))
25 allocate (realvla (11,22,33))
26 allocate (complexvla (11,22,33))
27 allocate (logicalvla (11,22,33))
28 allocate (charactervla (11,22,33))
29
30 l = allocated(intvla) ! vlas-allocated
31 l = allocated(realvla)
32 l = allocated(complexvla)
33 l = allocated(logicalvla)
34 l = allocated(charactervla)
35
36 intvla(:,:,:) = 1
37 realvla(:,:,:) = 3.14
38 complexvla(:,:,:) = cmplx(2.0,-3.0)
39 logicalvla(:,:,:) = .TRUE.
40 charactervla(:,:,:) = char(75)
41
42 intvla(5,5,5) = 42 ! vlas-initialized
43 realvla(5,5,5) = 4.13
44 complexvla(5,5,5) = cmplx(-3.0,2.0)
45 logicalvla(5,5,5) = .FALSE.
46 charactervla(5,5,5) = 'X'
47
48 ! dummy statement for bp
49 l = .FALSE. ! vlas-modified
50end program vla_primitives
This page took 0.707861 seconds and 4 git commands to generate.