diff --git a/test/codegen/bin_expr.c b/test/codegen/bin_expr.c index 2bb6dda7..2cb30395 100644 --- a/test/codegen/bin_expr.c +++ b/test/codegen/bin_expr.c @@ -11,5 +11,6 @@ int main() { __builtin_print(0 && 2); __builtin_print(5 || 0); __builtin_print(0 || 0); + __builtin_print((1, 2)); return 0; } diff --git a/test/codegen/bin_expr.exp b/test/codegen/bin_expr.exp index af817bcf..44f2c82c 100644 --- a/test/codegen/bin_expr.exp +++ b/test/codegen/bin_expr.exp @@ -10,3 +10,4 @@ 0 1 0 +2 diff --git a/test/codegen/comma_expr.c b/test/codegen/comma_expr.c new file mode 100644 index 00000000..c69e3db8 --- /dev/null +++ b/test/codegen/comma_expr.c @@ -0,0 +1,7 @@ +int main() { + int i; + int* p; + __builtin_print((i = 3, p = &i, i)); + __builtin_print(*p); + return 0; +} diff --git a/test/codegen/comma_expr.exp b/test/codegen/comma_expr.exp new file mode 100644 index 00000000..a5c88062 --- /dev/null +++ b/test/codegen/comma_expr.exp @@ -0,0 +1,2 @@ +3 +3