[PATCH 02/13] add testcases to check if phi-sources from removed targets are removed too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 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

diff --git a/validation/optim/bad-phisrc1.c b/validation/optim/bad-phisrc1.c
new file mode 100644
index 000000000000..59c5e4f1e66a
--- /dev/null
+++ b/validation/optim/bad-phisrc1.c
@@ -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\\.
+ */
diff --git a/validation/optim/bad-phisrc1a.c b/validation/optim/bad-phisrc1a.c
new file mode 100644
index 000000000000..cf07573b1fd3
--- /dev/null
+++ b/validation/optim/bad-phisrc1a.c
@@ -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\\.
+ */
+
diff --git a/validation/optim/bad-phisrc2.c b/validation/optim/bad-phisrc2.c
new file mode 100644
index 000000000000..3eade688f768
--- /dev/null
+++ b/validation/optim/bad-phisrc2.c
@@ -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\\.
+ */
diff --git a/validation/optim/bad-phisrc3.c b/validation/optim/bad-phisrc3.c
new file mode 100644
index 000000000000..6e437771b4b8
--- /dev/null
+++ b/validation/optim/bad-phisrc3.c
@@ -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\\.
+ */
-- 
2.31.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux