new file mode 100644
@@ -0,0 +1,16 @@
+void foo(int a, int b)
+{
+ if (b)
+ while ((a += 5) > a)
+ ;
+}
+
+/*
+ * check-name: bad-phisrc1
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-excludes: phi\\.
+ * check-output-excludes: phisource\\.
+ */
new file mode 100644
@@ -0,0 +1,24 @@
+int def(void);
+
+int fun4(struct xfrm_state *net, int cnt)
+{
+ int err = 0;
+ if (err)
+ goto out;
+ for (; net;)
+ err = def();
+ if (cnt)
+out:
+ return err;
+ return 0;
+}
+
+/*
+ * check-name: bad-phisrc1a
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-contains: select\\.
+ */
+
new file mode 100644
@@ -0,0 +1,17 @@
+int bad_phisrc2(int p, int a, int r)
+{
+ if (p)
+ r = a;
+ else if (r)
+ ;
+ return r;
+}
+
+/*
+ * check-name: bad-phisrc2
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-contains: select\\.
+ */
new file mode 100644
@@ -0,0 +1,21 @@
+void foo(void)
+{
+ int c = 1;
+ switch (3) {
+ case 0:
+ do {
+ ;
+ case 3: ;
+ } while (c++);
+ }
+}
+
+/*
+ * check-name: bad-phisrc3
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-pattern(2): phisrc\\.
+ * check-output-pattern(1): phi\\.
+ */
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- validation/optim/bad-phisrc1.c | 16 ++++++++++++++++ validation/optim/bad-phisrc1a.c | 24 ++++++++++++++++++++++++ validation/optim/bad-phisrc2.c | 17 +++++++++++++++++ validation/optim/bad-phisrc3.c | 21 +++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 validation/optim/bad-phisrc1.c create mode 100644 validation/optim/bad-phisrc1a.c create mode 100644 validation/optim/bad-phisrc2.c create mode 100644 validation/optim/bad-phisrc3.c