Add scoped_value_mark
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / vla-datatypes.f90
CommitLineData
61baf725 1! Copyright 2015-2017 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
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.
16
17program vla_primitives
18 integer, allocatable :: intvla(:, :, :)
19 real, allocatable :: realvla(:, :, :)
20 complex, allocatable :: complexvla(:, :, :)
21 logical, allocatable :: logicalvla(:, :, :)
22 character, allocatable :: charactervla(:, :, :)
23 logical :: l
24
25 allocate (intvla (11,22,33))
26 allocate (realvla (11,22,33))
27 allocate (complexvla (11,22,33))
28 allocate (logicalvla (11,22,33))
29 allocate (charactervla (11,22,33))
30
31 l = allocated(intvla) ! vlas-allocated
32 l = allocated(realvla)
33 l = allocated(complexvla)
34 l = allocated(logicalvla)
35 l = allocated(charactervla)
36
37 intvla(:,:,:) = 1
38 realvla(:,:,:) = 3.14
39 complexvla(:,:,:) = cmplx(2.0,-3.0)
40 logicalvla(:,:,:) = .TRUE.
41 charactervla(:,:,:) = char(75)
42
43 intvla(5,5,5) = 42 ! vlas-initialized
44 realvla(5,5,5) = 4.13
45 complexvla(5,5,5) = cmplx(-3.0,2.0)
46 logicalvla(5,5,5) = .FALSE.
47 charactervla(5,5,5) = 'X'
48
49 ! dummy statement for bp
50 l = .FALSE. ! vlas-modified
51end program vla_primitives
This page took 0.181982 seconds and 4 git commands to generate.