* gdb.base/constvars.c (struct crass, struct crisp): New structs.
authorKevin Buettner <kevinb@redhat.com>
Thu, 17 Oct 2002 20:22:58 +0000 (20:22 +0000)
committerKevin Buettner <kevinb@redhat.com>
Thu, 17 Oct 2002 20:22:58 +0000 (20:22 +0000)
* gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/constvars.c
gdb/testsuite/gdb.base/constvars.exp

index 5ca030910ee5772cdb530ff108507ed09a2c37db..4b5de0d4f777ac3b1db0ee2d0aa48fce904d809d 100644 (file)
@@ -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.
index b0ce7529ecb5dc55120feb258ca8e96a0100eeb6..16025770e35c3eeaf4d057975e14d1269f44caa0 100644 (file)
@@ -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 */
   /*
index bb062ef5cb9f7987dd9715422612278a6857624c..897a025af0c5572c5695d0d734ba595fcbe90458 100644 (file)
@@ -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