gdb/testsuite: add simavr.exp board
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / complex.exp
CommitLineData
b811d2c2 1# Copyright 2007-2020 Free Software Foundation, Inc.
be444858
DJ
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
be444858 6# (at your option) any later version.
e22f8b7c 7#
be444858
DJ
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#
be444858 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/>.
be444858 15
1db455a7 16standard_testfile .f90
86cd6bc8 17load_lib fortran.exp
be444858 18
5b362f04 19if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
be444858
DJ
20 return -1
21}
22
86cd6bc8
AKS
23if ![fortran_runto_main] then {
24 perror "Couldn't run to main"
be444858
DJ
25 continue
26}
27
be444858 28
1db455a7
AB
29gdb_breakpoint [gdb_get_line_number "stop"]
30gdb_continue_to_breakpoint "continue"
31
32gdb_test "print c" " = \\(1000,-50\\)"
33gdb_test "print c4" " = \\(1000,-50\\)"
34gdb_test "print c8" " = \\(321,-22\\)"
35gdb_test "print dc" " = \\(321,-22\\)"
36
1db455a7
AB
37gdb_test "print c16" " = \\(-874,19\\)"
38
39gdb_test "whatis c" "type = complex\\(kind=4\\)"
40gdb_test "print \$_creal (c)" " = 1000"
7549fed8
TV
41with_test_prefix "c" {
42 gdb_test "whatis \$" " = real"
43}
1db455a7
AB
44
45gdb_test "whatis c4" "type = complex\\(kind=4\\)"
46gdb_test "print \$_creal (c4)" " = 1000"
7549fed8
TV
47with_test_prefix "c4" {
48 gdb_test "whatis \$" " = real"
49}
1db455a7
AB
50gdb_test "whatis c8" "type = complex\\(kind=8\\)"
51gdb_test "print \$_creal (c8)" " = 321"
7549fed8
TV
52with_test_prefix "c8" {
53 gdb_test "whatis \$" " = real\\*8"
54}
1db455a7
AB
55gdb_test "whatis dc" "type = complex\\(kind=8\\)"
56gdb_test "print \$_creal (dc)" " = 321"
7549fed8
TV
57with_test_prefix "dc" {
58 gdb_test "whatis \$" " = real\\*8"
59}
1db455a7
AB
60
61gdb_test "whatis c16" "type = complex\\(kind=16\\)"
1db455a7 62gdb_test "print \$_creal (c16)" " = -874"
7549fed8
TV
63with_test_prefix "c16" {
64 gdb_test "whatis \$" " = real\\*16"
65}
be444858 66
This page took 1.44498 seconds and 4 git commands to generate.