]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.fortran/derived-type.f90
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.fortran / derived-type.f90
CommitLineData
e2882c85 1! Copyright 2006-2018 Free Software Foundation, Inc.
15c46491
WZ
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
e22f8b7c 5! the Free Software Foundation; either version 3 of the License, or
15c46491 6! (at your option) any later version.
e22f8b7c 7!
15c46491
WZ
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.
e22f8b7c 12!
15c46491 13! You should have received a copy of the GNU General Public License
e22f8b7c 14! along with this program. If not, see <http://www.gnu.org/licenses/>.
15c46491
WZ
15!
16! Ihis file is the Fortran source file for derived-type.exp. It was written
17! by Wu Zhou. (woodzltc@cn.ibm.com)
18
19program main
20
21 type bar
22 integer :: c
23 real :: d
24 end type
25 type foo
26 real :: a
27 type(bar) :: x
28 character*7 :: b
29 end type foo
30 type(foo) :: q
31 type(bar) :: p
4f19a0e6 32 type(foo) :: this
15c46491
WZ
33
34 p = bar(1, 2.375)
35 q%a = 3.125
36 q%b = "abcdefg"
37 q%x%c = 1
38 q%x%d = 2.375
4f19a0e6
WT
39 this%a = 3.125
40 this%b = "abcdefg"
41 this%x%c = 1
42 this%x%d = 2.375
43 print *,p,q,this
15c46491
WZ
44
45end program main