summaryrefslogtreecommitdiff
path: root/test/regression/expr1.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/expr1.c')
-rw-r--r--test/regression/expr1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/regression/expr1.c b/test/regression/expr1.c
new file mode 100644
index 0000000..0cc7b54
--- /dev/null
+++ b/test/regression/expr1.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+struct list { int hd; struct list * tl; };
+
+struct list * f(struct list ** p)
+{
+ return ((*p)->tl = 0);
+}
+
+int main(int argc, char ** argv)
+{
+ struct list l;
+ l.tl = &l;
+ f(&(l.tl));
+ printf("Result: %p\n", l.tl);
+ return 0;
+}