summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/2008-07-29-override-alias-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/2008-07-29-override-alias-decl.c')
-rw-r--r--test/CodeGen/2008-07-29-override-alias-decl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/2008-07-29-override-alias-decl.c b/test/CodeGen/2008-07-29-override-alias-decl.c
new file mode 100644
index 0000000..43f4e3e
--- /dev/null
+++ b/test/CodeGen/2008-07-29-override-alias-decl.c
@@ -0,0 +1,12 @@
+// RUN: clang-cc -emit-llvm -o - %s | grep -e "^@f" | count 1
+
+int x() {}
+
+int f() __attribute__((weak, alias("x")));
+
+/* Test that we link to the alias correctly instead of making a new
+ forward definition. */
+int f();
+int h() {
+ return f();
+}
OpenPOWER on IntegriCloud