[PATCH 1/2] label: add testcase for label redefinition

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

 



Redefined labels create inconsistencies in BB processing.
Add a testcase for it.

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

diff --git a/validation/label-redefined.c b/validation/label-redefined.c
new file mode 100644
index 000000000..5e0a51b41
--- /dev/null
+++ b/validation/label-redefined.c
@@ -0,0 +1,18 @@
+extern void fun(void);
+
+static void foo(int p)
+{
+l:
+	if (p)
+l:
+		fun();
+}
+
+/*
+ * check-name: label-redefined
+ * check-known-to-fail
+ *
+ * check-error-start
+label-redefined.c:7:1: error: label 'l' redefined
+ * check-error-end
+ */
-- 
2.17.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