[gdb/testsuite] Split up multi-exec test-cases
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / macscp1.c
index 89a1b07d1e6656f08326343e726a34007281771c..09a4c0dd182d4c1fe404a8d7018dbe9ca40a60ef 100644 (file)
@@ -5,6 +5,25 @@
 #define STRINGIFY(a) INNER_STRINGIFY(a)
 #define INNER_STRINGIFY(a) #a
 
+#define FIFTY_SEVEN 57
+
+#define FORTY_EIGHT 48
+#undef  FORTY_EIGHT
+
+struct outer
+{
+  struct fields
+  {
+    struct fault
+    {
+      int addr;
+    } fault;
+  } fields;
+};
+struct outer address;
+
+#define addr fields.fault.addr
+
 /* A macro named UNTIL_<func> is #defined until just before the
    definition of the function <func>.
 
@@ -63,6 +82,20 @@ macscp1_3 ()
   puts ("macscp1_3");
 }
 
+void
+macscp_expr (void)
+{
+  int foo = -1;
+
+  foo = 0;  /* set breakpoint here */
+#define MACRO_TO_EXPAND foo
+  foo = 1;                     /* set second breakpoint here */
+#undef MACRO_TO_EXPAND
+  foo = 2;                     /* stopping point for line test */
+}
+
+#define TWENTY_THREE 23
+
 int
 main (int argc, char **argv)
 {
@@ -77,4 +110,5 @@ main (int argc, char **argv)
   macscp4_2_from_macscp3 ();
   macscp3_2 ();
   macscp1_3 ();
+  macscp_expr ();
 }
This page took 0.037649 seconds and 4 git commands to generate.