summaryrefslogtreecommitdiff
path: root/test/regression/init4.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/init4.c')
-rw-r--r--test/regression/init4.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/regression/init4.c b/test/regression/init4.c
new file mode 100644
index 0000000..02b0bd5
--- /dev/null
+++ b/test/regression/init4.c
@@ -0,0 +1,13 @@
+/* C99-style initializers in the middle of a block */
+
+int g(int x) { return x << 2; }
+
+int f(int x, int y)
+{
+ int a = x + y;
+ {
+ y++;
+ int b = y - g(x);
+ return b * a;
+ }
+}