summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-14 20:59:27 +0000
committerTom Tromey <tromey@redhat.com>2013-01-14 20:59:27 +0000
commit06d66ee9d97cf451db4bdd7952eca099bc171706 (patch)
tree492076e1ff0a1ecf422c8639d8d1efb56a0746af /gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
parentc9bf062262da5a158d7a74907f8db2cd6df6bdfd (diff)
downloadbinutils-gdb-06d66ee9d97cf451db4bdd7952eca099bc171706.tar.gz
PR symtab/14442:
* c-typeprint.c (cp_type_print_method_args): Handle 'restrict'. (c_type_print_modifier): Likewise. * dwarf2read.c (read_tag_restrict_type): New function. (read_type_die_1): Handle DW_TAG_restrict_type. * gdbtypes.c (make_restrict_type): New function. (recursive_dump_type): Handle TYPE_RESTRICT. * gdbtypes.h (enum type_flag_values): Renumber. (enum type_instance_flag_value): Add TYPE_INSTANCE_FLAG_RESTRICT. (TYPE_RESTRICT): New macro. (make_restrict_type): Declare. gdb/testsuite * gdb.dwarf2/dw2-restrict.S: New file. * gdb.dwarf2/dw2-restrict.c: New file. * gdb.dwarf2/dw2-restrict.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-restrict.exp')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restrict.exp29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
new file mode 100644
index 00000000000..e6f3fe88e4f
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.exp
@@ -0,0 +1,29 @@
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if {![dwarf2_support]} {
+ return 0
+}
+
+standard_testfile .S
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}]} {
+ return -1
+}
+
+gdb_test "ptype f" "int \\(char \\\* restrict\\)"