Handle CRLF when reading XML on Windows
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.fortran / complex.exp
CommitLineData
42a4f53d 1# Copyright 2007-2019 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
be444858 17
5b362f04 18if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug f90 quiet}]} {
be444858
DJ
19 return -1
20}
21
be444858
DJ
22if ![runto MAIN__] then {
23 perror "Couldn't run to MAIN__"
24 continue
25}
26
be444858 27
1db455a7
AB
28gdb_breakpoint [gdb_get_line_number "stop"]
29gdb_continue_to_breakpoint "continue"
30
31gdb_test "print c" " = \\(1000,-50\\)"
32gdb_test "print c4" " = \\(1000,-50\\)"
33gdb_test "print c8" " = \\(321,-22\\)"
34gdb_test "print dc" " = \\(321,-22\\)"
35
1db455a7
AB
36gdb_test "print c16" " = \\(-874,19\\)"
37
38gdb_test "whatis c" "type = complex\\(kind=4\\)"
39gdb_test "print \$_creal (c)" " = 1000"
40gdb_test "whatis \$" " = real"
41
42gdb_test "whatis c4" "type = complex\\(kind=4\\)"
43gdb_test "print \$_creal (c4)" " = 1000"
44gdb_test "whatis \$" " = real"
45
46gdb_test "whatis c8" "type = complex\\(kind=8\\)"
47gdb_test "print \$_creal (c8)" " = 321"
48gdb_test "whatis \$" " = real\\*8"
49
50gdb_test "whatis dc" "type = complex\\(kind=8\\)"
51gdb_test "print \$_creal (dc)" " = 321"
52gdb_test "whatis \$" " = real\\*8"
53
54gdb_test "whatis c16" "type = complex\\(kind=16\\)"
1db455a7
AB
55gdb_test "print \$_creal (c16)" " = -874"
56gdb_test "whatis \$" " = real\\*16"
be444858 57
This page took 1.331994 seconds and 4 git commands to generate.