From 6d086d566637955a335d04a1ad9e53b214b112f5 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Thu, 17 Oct 2002 20:22:58 +0000 Subject: * gdb.base/constvars.c (struct crass, struct crisp): New structs. * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/constvars.c | 5 +++++ gdb/testsuite/gdb.base/constvars.exp | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5ca030910ee..4b5de0d4f77 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-10-17 Kevin Buettner + + * gdb.base/constvars.c (struct crass, struct crisp): New structs. + * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests. + 2002-10-02 Jim Blandy * gdb.c++/casts.cc, gdb.c++/casts.exp: New test. diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c index b0ce7529ecb..16025770e35 100644 --- a/gdb/testsuite/gdb.base/constvars.c +++ b/gdb/testsuite/gdb.base/constvars.c @@ -166,6 +166,11 @@ main (void) const volatile char * const volatile vagary = &victor; const volatile unsigned char * const volatile vendor = &vicar; + + /* various structs with const members */ + + struct crass { char * const ptr; } crass; + struct crisp { char * const *ptr; } crisp; /* misc. references */ /* diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp index bb062ef5cb9..897a025af0c 100644 --- a/gdb/testsuite/gdb.base/constvars.exp +++ b/gdb/testsuite/gdb.base/constvars.exp @@ -278,6 +278,11 @@ proc do_constvar_tests {} { gdb_test "print *locust" " = 70" local_compiler_xfail_check gdb_test "ptype locust" "type = double \\* const" + + local_compiler_xfail_check + gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}" + local_compiler_xfail_check + gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}" } do_constvar_tests -- cgit v1.2.1