aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.fortran/complex.f90
diff options
context:
space:
mode:
authorNils-Christian Kempke <nils-christian.kempke@intel.com>2022-04-11 14:06:56 +0200
committerNils-Christian Kempke <nils-christian.kempke@intel.com>2022-04-11 14:06:56 +0200
commit27e8f72f351042e464aa41fa9b39c16f1cd1f965 (patch)
treea24a0de0f7ee0bf79bbd9dd45e5590f610ce8592 /gdb/testsuite/gdb.fortran/complex.f90
parent891e4190ba705373eec7b374209478215fff5401 (diff)
downloadbinutils-27e8f72f351042e464aa41fa9b39c16f1cd1f965.zip
binutils-27e8f72f351042e464aa41fa9b39c16f1cd1f965.tar.gz
binutils-27e8f72f351042e464aa41fa9b39c16f1cd1f965.tar.bz2
gdb/fortran/testsuite: add complex from integers test
When working on the files I noted that there was no actual test for a COMPLEX built from two INTEGERS. I added that now for completion.
Diffstat (limited to 'gdb/testsuite/gdb.fortran/complex.f90')
-rw-r--r--gdb/testsuite/gdb.fortran/complex.f907
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.fortran/complex.f90 b/gdb/testsuite/gdb.fortran/complex.f90
index 5c9491d..cd1acec 100644
--- a/gdb/testsuite/gdb.fortran/complex.f90
+++ b/gdb/testsuite/gdb.fortran/complex.f90
@@ -17,8 +17,9 @@ program test_complex
real*4 r4a, r4b
real*8 r8a, r8b
real*16 r16a, r16b
+ integer ia, ib
- complex c
+ complex c, ci
complex(kind=4) c4
complex(kind=8) c8
double complex dc
@@ -30,15 +31,19 @@ program test_complex
r8b = -22
r16a = -874
r16b = 19
+ ia = -4
+ ib = 12
c = cmplx(r4a,r4b)
c4 = cmplx(r4a,r4b)
c8 = cmplx(r8a, r8b)
dc = cmplx(r8a, r8b)
c16 = cmplx(r16a, r16b)
+ ci = cmplx(ia, ib)
print *, c, c4, c8, dc, c16 ! stop
print *, r4a, r4b
print *, r8a, r8b
print *, r16a, r16b
+ print *, ia, ib
end program test_complex