]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.fortran/common-block.f90
Update years in copyright notice for the GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.fortran / common-block.f90
1 ! Copyright 2008-2013 Free Software Foundation, Inc.
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 3 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 !
17 ! Ihis file is the Fortran source file for dynamic.exp.
18 ! Original file written by Jakub Jelinek <jakub@redhat.com>.
19 ! Modified for the GDB testcase by Jan Kratochvil <jan.kratochvil@redhat.com>.
20
21 subroutine in
22
23 INTEGER*4 ix
24 REAL*4 iy2
25 REAL*8 iz
26
27 INTEGER*4 ix_x
28 REAL*4 iy_y
29 REAL*8 iz_z2
30
31 common /fo_o/ix,iy2,iz
32 common /foo/ix_x,iy_y,iz_z2
33
34 iy = 5
35 iz_z = 55
36
37 if (ix .ne. 11 .or. iy2 .ne. 22.0 .or. iz .ne. 33.0) call abort
38 if (ix_x .ne. 1 .or. iy_y .ne. 2.0 .or. iz_z2 .ne. 3.0) call abort
39
40 ix = 0 ! stop-here-in
41
42 end subroutine in
43
44 program common_test
45
46 INTEGER*4 ix
47 REAL*4 iy
48 REAL*8 iz
49
50 INTEGER*4 ix_x
51 REAL*4 iy_y
52 REAL*8 iz_z
53
54 common /foo/ix,iy,iz
55 common /fo_o/ix_x,iy_y,iz_z
56
57 ix = 1
58 iy = 2.0
59 iz = 3.0
60
61 ix_x = 11
62 iy_y = 22.0
63 iz_z = 33.0
64
65 call in ! stop-here-out
66
67 end program common_test