gdb/fortran: print function arguments when printing function type
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / complex.exp
1 # Copyright 2007-2019 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, see <http://www.gnu.org/licenses/>.
15
16 standard_testfile .f90
17
18 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
19 return -1
20 }
21
22 if ![runto MAIN__] then {
23 perror "Couldn't run to MAIN__"
24 continue
25 }
26
27
28 gdb_breakpoint [gdb_get_line_number "stop"]
29 gdb_continue_to_breakpoint "continue"
30
31 gdb_test "print c" " = \\(1000,-50\\)"
32 gdb_test "print c4" " = \\(1000,-50\\)"
33 gdb_test "print c8" " = \\(321,-22\\)"
34 gdb_test "print dc" " = \\(321,-22\\)"
35
36 setup_kfail gdb/18644 "*-*-*"
37 gdb_test "print c16" " = \\(-874,19\\)"
38
39 gdb_test "whatis c" "type = complex\\(kind=4\\)"
40 gdb_test "print \$_creal (c)" " = 1000"
41 gdb_test "whatis \$" " = real"
42
43 gdb_test "whatis c4" "type = complex\\(kind=4\\)"
44 gdb_test "print \$_creal (c4)" " = 1000"
45 gdb_test "whatis \$" " = real"
46
47 gdb_test "whatis c8" "type = complex\\(kind=8\\)"
48 gdb_test "print \$_creal (c8)" " = 321"
49 gdb_test "whatis \$" " = real\\*8"
50
51 gdb_test "whatis dc" "type = complex\\(kind=8\\)"
52 gdb_test "print \$_creal (dc)" " = 321"
53 gdb_test "whatis \$" " = real\\*8"
54
55 gdb_test "whatis c16" "type = complex\\(kind=16\\)"
56 setup_kfail gdb/18644 "*-*-*"
57 gdb_test "print \$_creal (c16)" " = -874"
58 gdb_test "whatis \$" " = real\\*16"
59
This page took 0.033034 seconds and 4 git commands to generate.