]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.fortran/vla-alloc-assoc.exp
Fix more cases of improper test names
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.fortran / vla-alloc-assoc.exp
1 # Copyright 2015-2016 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 "vla.f90"
17
18 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
19 {debug f90 quiet}] } {
20 return -1
21 }
22
23 if ![runto_main] {
24 untested "could not run to main"
25 return -1
26 }
27
28 # Check the association status of various types of VLA's
29 # and pointer to VLA's.
30 gdb_breakpoint [gdb_get_line_number "vla1-allocated"]
31 gdb_continue_to_breakpoint "vla1-allocated"
32 gdb_test "print l" " = \\.TRUE\\." \
33 "print vla1 allocation status (allocated)"
34
35 gdb_breakpoint [gdb_get_line_number "vla2-allocated"]
36 gdb_continue_to_breakpoint "vla2-allocated"
37 gdb_test "print l" " = \\.TRUE\\." \
38 "print vla2 allocation status (allocated)"
39
40 gdb_breakpoint [gdb_get_line_number "pvla-associated"]
41 gdb_continue_to_breakpoint "pvla-associated"
42 gdb_test "print l" " = \\.TRUE\\." \
43 "print pvla associated status (associated)"
44
45 gdb_breakpoint [gdb_get_line_number "pvla-re-associated"]
46 gdb_continue_to_breakpoint "pvla-re-associated"
47 gdb_test "print l" " = \\.TRUE\\." \
48 "print pvla associated status (re-associated)"
49
50 gdb_breakpoint [gdb_get_line_number "pvla-deassociated"]
51 gdb_continue_to_breakpoint "pvla-deassociated"
52 gdb_test "print l" " = \\.FALSE\\." \
53 "print pvla allocation status (deassociated)"
54
55 gdb_breakpoint [gdb_get_line_number "vla1-deallocated"]
56 gdb_continue_to_breakpoint "vla1-deallocated"
57 gdb_test "print l" " = \\.FALSE\\." \
58 "print vla1 allocation status (deallocated)"
59 gdb_test "print vla1" " = <not allocated>" \
60 "print deallocated vla1"
61
62 gdb_breakpoint [gdb_get_line_number "vla2-deallocated"]
63 gdb_continue_to_breakpoint "vla2-deallocated"
64 gdb_test "print l" " = \\.FALSE\\." "print vla2 deallocated"
65 gdb_test "print vla2" " = <not allocated>" "print deallocated vla2"