Work on file usr/src/ucb/dbx/test/t.c
Work on file usr/src/ucb/dbx/test/struct.c
Work on file usr/src/ucb/dbx/test/reg.c
Work on file usr/src/ucb/dbx/test/bf.c
Work on file usr/src/ucb/dbx/test/x
Work on file usr/src/ucb/dbx/test/float.c
Work on file usr/src/ucb/dbx/test/own.c
Work on file usr/src/ucb/dbx/test/t1.c
Work on file usr/src/ucb/dbx/test/bug.c
Work on file usr/src/ucb/dbx/test/enum.c
Synthesized-from: CSRG/cd1/4.1c.2
--- /dev/null
+main()
+{
+ struct {
+ int first;
+ int second;
+ int a : 8;
+ int b : 8;
+ int c;
+ } x;
+
+ x.a = 2;
+ x.b = 10;
+ x.c = 1;
+}
--- /dev/null
+typedef struct blah *Blah;
+typedef struct List *List;
+
+struct List {
+ int b;
+ char c;
+};
+
+struct blah {
+ int a;
+ List p;
+};
+
+main()
+{
+ struct blah b, *p;
+ struct List list;
+
+ p = &b;
+ b.a = 3;
+ b.p = &list;
+ b.p->b = 4;
+ b.p->c = 'c';
+}
--- /dev/null
+typedef enum { RED, GREEN, BLUE } Color;
+
+main()
+{
+ Color c;
+
+ c = BLUE;
+ f(RED);
+}
+
+f(c)
+Color c;
+{
+ printf("c = %d\n", c);
+}
--- /dev/null
+double f(x)
+double x;
+{
+ return 3.14*x;
+}
+
+main()
+{
+ double x;
+
+ x = f(3.0);
+}
--- /dev/null
+main()
+{
+ f(3);
+ f(4);
+}
+
+f(x)
+int x;
+{
+ static int ownx;
+
+ ownx = x;
+}
--- /dev/null
+struct blah {
+ int x;
+ int y;
+};
+
+main()
+{
+ register int i;
+ register struct blah *p;
+ register char *s;
+ struct blah b;
+ int j;
+
+ s = "this is a test";
+ s += 5;
+ j = 0;
+ p = &b;
+ p->x = 3;
+ p->y = 4;
+ for (i = 0; i < 2; i++) {
+ j = i;
+ put(i);
+ }
+}
+
+static put(i)
+register int i;
+{
+ printf("%d ", i);
+}
--- /dev/null
+struct blah {
+ int a;
+ struct {
+ int b;
+ } c;
+};
+
+struct blah f(x)
+int x;
+{
+ struct blah r;
+
+ r.a = x;
+ return r;
+}
+
+main()
+{
+ struct blah x;
+ struct blah *y;
+
+ x = f(3);
+ y = &x;
+}
--- /dev/null
+#include <stdio.h>
+
+typedef struct Blah *Blah;
+
+struct recursive {
+ int val;
+ struct recursive *next;
+ struct nest {
+ int a;
+ } n;
+} r;
+
+typedef int Integer;
+
+struct blah { int x, y; } z;
+int array[10];
+int i = 3;
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ struct blah p;
+ int a, b;
+ typedef enum color { RED, GREEN, BLUE } Color;
+ Color c;
+ double x;
+ float y;
+
+ printf("testing %s", argv[0]);
+ if (argc > 1) {
+ printf(" %s", argv[1]);
+ }
+ putchar('\n');
+ c = BLUE;
+ x = 3.5;
+ y = 4.6;
+ abort();
+}
--- /dev/null
+typedef struct Blah *Blah;
+
+Blah f();
+
+main()
+{
+ Blah x;
+
+ x = f();
+}