* gdb.cp/m-static.h (class gnu_obj_4): Add dummy member.
authorDaniel Jacobowitz <drow@false.org>
Fri, 5 May 2006 18:04:09 +0000 (18:04 +0000)
committerDaniel Jacobowitz <drow@false.org>
Fri, 5 May 2006 18:04:09 +0000 (18:04 +0000)
* gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4
is allocated by the compiler.
* gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s,
anons, e, anone to force their allocation by the compiler.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/m-static.cc
gdb/testsuite/gdb.cp/m-static.h
gdb/testsuite/gdb.mi/var-cmd.c

index bbc2f36..e245511 100644 (file)
@@ -1,4 +1,12 @@
-2006-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
+2006-05-05  Christophe Lyon  <christophe.lyon@st.com>
+
+       * gdb.cp/m-static.h (class gnu_obj_4): Add dummy member.
+       * gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4
+       is allocated by the compiler.
+       * gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s,
+       anons, e, anone to force their allocation by the compiler.
+
+2006-05-05  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * gdb.base/help.exp: Update expected text for help d and
        help delete.
index 6d08cb0..9dae5ee 100644 (file)
@@ -68,5 +68,6 @@ int main()
   gnu_obj_3<long>      test3(greek);
   gnu_obj_4            test4;
 
-  return 0;                            // breakpoint: constructs-done
+  test4.dummy = 0;
+  return test4.dummy;  // breakpoint: constructs-done
 }
index 137d3b7..012cd77 100644 (file)
@@ -7,5 +7,8 @@ class gnu_obj_4
   static const int nowhere;
   // At some point, perhaps:
   // static const int everywhere = 317;
+
+  // try to ensure test4 is actually allocated
+  int dummy;
 };
 
index 2a297d2..4ccd570 100644 (file)
@@ -301,6 +301,12 @@ do_special_tests (void)
   int a;
 
   a = 1;   
+  u.integer = a;
+  anonu.a = a;
+  s.integer = a;
+  anons.a = a;
+  e = bar;
+  anone = A;
   incr_a(2);
 }