aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/goto-stmt-expr-short-circuit.c
diff options
context:
space:
mode:
Diffstat (limited to 'validation/linear/goto-stmt-expr-short-circuit.c')
-rw-r--r--validation/linear/goto-stmt-expr-short-circuit.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/validation/linear/goto-stmt-expr-short-circuit.c b/validation/linear/goto-stmt-expr-short-circuit.c
new file mode 100644
index 00000000..a5953e73
--- /dev/null
+++ b/validation/linear/goto-stmt-expr-short-circuit.c
@@ -0,0 +1,31 @@
+int foo(int p)
+{
+ goto inside;
+ if (0 && ({
+inside:
+ return 1;
+ 2;
+ }))
+ return 3;
+ return 4;
+}
+
+int bar(int p)
+{
+ if (0 && ({
+inside:
+ return 1;
+ 2;
+ }))
+ return 3;
+ goto inside;
+}
+
+/*
+ * check-name: goto-stmt-expr-short-circuit
+ * check-command: test-linearize -Wno-decl $file
+ *
+ * check-error-ignore
+ * check-output-ignore
+ * check-output-excludes: END
+ */