[PATCH 1/2] add testcase for missing function designator expansion

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

 



Add a testcase showing function designator are not expanded.

References: https://lore.kernel.org/lkml/1542623503-3755-1-git-send-email-yamada.masahi>
Reported-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/expand/function-pointer.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 validation/expand/function-pointer.c

diff --git a/validation/expand/function-pointer.c b/validation/expand/function-pointer.c
new file mode 100644
index 000000000..45aace161
--- /dev/null
+++ b/validation/expand/function-pointer.c
@@ -0,0 +1,23 @@
+struct s {
+	int (*fun)(void);
+};
+
+inline struct s *inl(struct s *p)
+{
+	1 + 0;
+	return p;
+}
+
+static void tst(struct s *s)
+{
+	inl(s)->fun();
+}
+
+/*
+ * check-name: function-pointer
+ * check-command: test-linearize -fdump-ir $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-excludes: add\\.32.*\\$1, \\$0
+ */
-- 
2.19.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