diff options
Diffstat (limited to 'test/regression/expr1.c')
-rw-r--r-- | test/regression/expr1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/regression/expr1.c b/test/regression/expr1.c new file mode 100644 index 00000000..0cc7b540 --- /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; +} |