From 5b575aa2e3e42085d9087210b41560cf5849c746 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Thu, 30 Jan 2020 13:53:18 -0800 Subject: decl: Better check for inline definitions --- test/inline-definition.c | 7 +++++++ test/inline-definition.qbe | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 test/inline-definition.c create mode 100644 test/inline-definition.qbe (limited to 'test') diff --git a/test/inline-definition.c b/test/inline-definition.c new file mode 100644 index 0000000..224b14c --- /dev/null +++ b/test/inline-definition.c @@ -0,0 +1,7 @@ +extern void f(void); + +/* +f is not an inline definition, due to the preceeding declaration, +so we *should* emit an external definition for it. +*/ +inline void f(void) {} diff --git a/test/inline-definition.qbe b/test/inline-definition.qbe new file mode 100644 index 0000000..2401635 --- /dev/null +++ b/test/inline-definition.qbe @@ -0,0 +1,6 @@ +export +function $f() { +@start.1 +@body.2 + ret +} -- cgit v1.2.3