[PATCH 15/15] add test case for missing conversion to select

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

 



This may seems as an missing optimization problem but in truth,
the root cause is a problem with SSA conversion.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/optim/missing-select.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 validation/optim/missing-select.c

diff --git a/validation/optim/missing-select.c b/validation/optim/missing-select.c
new file mode 100644
index 000000000..4796e0586
--- /dev/null
+++ b/validation/optim/missing-select.c
@@ -0,0 +1,24 @@
+static int foo(int **g)
+{
+	int i = 1;
+	int *a[2];
+	int **p;
+
+	a[1] = &i;
+	if (g)
+		p = g;
+	else
+		p = &a[0];
+	if (!g)
+		**p = 0;
+	return i;
+}
+
+/*
+ * check-name: missing-select
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-contains: select\\.
+ */
-- 
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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