diff options
author | Kevin Buettner <kevinb@redhat.com> | 2002-10-17 20:22:58 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2002-10-17 20:22:58 +0000 |
commit | 6d086d566637955a335d04a1ad9e53b214b112f5 (patch) | |
tree | aa8e07e3b8c8826b1a604ed00458e99d65e63d78 /gdb/testsuite | |
parent | d71813b537754d0dc62702af1eddedf17870c2a5 (diff) | |
download | gdb-6d086d566637955a335d04a1ad9e53b214b112f5.tar.gz |
* gdb.base/constvars.c (struct crass, struct crisp): New structs.
* gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/constvars.c | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/constvars.exp | 5 |
3 files changed, 15 insertions, 0 deletions
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 <kevinb@redhat.com> + + * 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 <jimb@redhat.com> * 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 |