OSDN Git Service

* gdb.base/constvars.c (struct crass, struct crisp): New structs.
authorkevinb <kevinb>
Thu, 17 Oct 2002 20:22:57 +0000 (20:22 +0000)
committerkevinb <kevinb>
Thu, 17 Oct 2002 20:22:57 +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 5ca0309..4b5de0d 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 b0ce752..1602577 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 bb062ef..897a025 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