* gdb.base/constvars.c (main): Reference crass and crisp.
* gdb.base/gdb1821.c (main): Reference bar.
* gdb.cp/gdb1355.cc (main): Reference s1.
* gdb.cp/hang1.cc (dummy2, dummy3): Declare.
(main): Call them.
* gdb.cp/hang2.cc (dummy2): Define.
* gdb.cp/hang3.cc (dummy3): Define.
* gdb.cp/m-data.cc (main): Reference shadow.
+2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gdb.base/break.c (need_malloc): New.
+ * gdb.base/constvars.c (main): Reference crass and crisp.
+ * gdb.base/gdb1821.c (main): Reference bar.
+ * gdb.cp/gdb1355.cc (main): Reference s1.
+ * gdb.cp/hang1.cc (dummy2, dummy3): Declare.
+ (main): Call them.
+ * gdb.cp/hang2.cc (dummy2): Define.
+ * gdb.cp/hang3.cc (dummy3): Define.
+ * gdb.cp/m-data.cc (main): Reference shadow.
+
2009-11-12 Daniel Jacobowitz <dan@codesourcery.com>
Nathan Froyd <froydnj@codesourcery.com>
extern void marker4 ();
#endif
+/* We're used by a test that requires malloc, so make sure it is in
+ the executable. */
+void *need_malloc ()
+{
+ return malloc (1);
+}
+
/*
* This simple classical example of recursion is useful for
* testing stack backtraces and such.
struct crass { char * const ptr; } crass = { lamprey };
struct crisp { char * const *ptr; } crisp = { &lamprey };
+ /* Reference the structs so that they are not discarded. */
+ struct crass *creed = &crass;
+ struct crisp *crow = &crisp;
+
/* misc. references */
/*
const char & radiation = laconic;
struct foo { double x__0, y__0, z__1; } bar;
-int main(void) { return 0; }
+int main(void) { return (int) bar.x__0; }
int main ()
{
- return 0;
+ /* Reference s1 so that it is included. */
+ return s1.m_int - 117;
}
#include "hang.H"
-int main (int argc, char **argv) { return 0; }
+extern int dummy2 (void);
+extern int dummy3 (void);
+
+int main (int argc, char **argv) { return dummy2() + dummy3(); }
};
int var_in_b = 1729;
+
+int dummy2 (void)
+{
+ return var_in_b;
+}
const struct B *const_B_ptr;
int var_in_hang3 = 42;
+
+int dummy3 (void)
+{
+ return var_in_hang3;
+}
C theC (1); // breakpoint: first-constructs-done
theC.marker ();
- return 0;
+ return shadow;
}