]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.fortran/complex.f90
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.fortran / complex.f90
CommitLineData
213516ef 1! Copyright 2007-2023 Free Software Foundation, Inc.
1db455a7
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 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, see <http://www.gnu.org/licenses/>.
15
16program test_complex
17 real*4 r4a, r4b
18 real*8 r8a, r8b
19 real*16 r16a, r16b
27e8f72f 20 integer ia, ib
1db455a7 21
27e8f72f 22 complex c, ci
1db455a7
AB
23 complex(kind=4) c4
24 complex(kind=8) c8
25 double complex dc
26 complex(kind=16) c16
27
28 r4a = 1000
29 r4b = -50
30 r8a = 321
31 r8b = -22
32 r16a = -874
33 r16b = 19
27e8f72f
NCK
34 ia = -4
35 ib = 12
1db455a7
AB
36
37 c = cmplx(r4a,r4b)
38 c4 = cmplx(r4a,r4b)
39 c8 = cmplx(r8a, r8b)
40 dc = cmplx(r8a, r8b)
41 c16 = cmplx(r16a, r16b)
27e8f72f 42 ci = cmplx(ia, ib)
1db455a7
AB
43
44 print *, c, c4, c8, dc, c16 ! stop
45 print *, r4a, r4b
46 print *, r8a, r8b
47 print *, r16a, r16b
27e8f72f 48 print *, ia, ib
1db455a7 49end program test_complex