Commit | Line | Data |
---|---|---|
b811d2c2 | 1 | ! Copyright 2019-2020 Free Software Foundation, Inc. |
2e62ab40 AB |
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, see <http://www.gnu.org/licenses/>. | |
15 | ||
16 | program max_depth_test | |
17 | type :: s1 | |
18 | integer :: a | |
19 | end type s1 | |
20 | ||
21 | type :: s2 | |
22 | type (s1) :: b | |
23 | integer :: array (5) | |
24 | end type s2 | |
25 | ||
26 | type :: s3 | |
27 | character(5) :: string | |
28 | type (s2) :: c | |
29 | end type s3 | |
30 | ||
31 | type :: s4 | |
32 | type (s3) :: d | |
33 | end type s4 | |
34 | ||
35 | logical :: l | |
36 | type (s4) :: var | |
37 | ||
38 | var%d%c%b%a = 1 | |
39 | var%d%c%array = 0 | |
40 | var%d%string = "abcde" | |
41 | l = .FALSE. ! stop-here | |
42 | end program max_depth_test |