2009-02-06 Paul Pluzhnikov <ppluzhnikov@google.com>
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 10 Feb 2009 00:59:27 +0000 (00:59 +0000)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Tue, 10 Feb 2009 00:59:27 +0000 (00:59 +0000)
* gdb.cp/pr9594.cc: Prevent GCC from optimizing 'a' out.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/pr9594.cc

index bf6de5101a58a1912bb72cae4539e235130969af..d51a49a98b8fccd137274374ca3c8ebf24380db8 100644 (file)
@@ -1,3 +1,7 @@
+2009-02-06  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+       * gdb.cp/pr9594.cc: Prevent GCC from optimizing 'a' out.
+
 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
 
        * gdb.base/siginfo-obj.c, gdb.base/siginfo-obj.exp: New.
index bb7e1d6e227bde3ba48190a2d22166710a0d44e2..8fdee84ae1fae9ca3d6f7f124b0d0a0593bc746d 100644 (file)
@@ -47,5 +47,6 @@ int main ()
   } a;
   Foo foo1;
   foo1.set_foo (42);           // Set breakpoint here.
+  a.get();                     // Prevent compiler from throwing 'a' away.
   return 0;
 }