summaryrefslogtreecommitdiff
path: root/test/Sema/pragma-weak.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commitbfef399519ca9b8a4b4c6b563253bad7e0eeffe0 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /test/Sema/pragma-weak.c
parent6a0372513edbc473b538d2f724efac50405d6fef (diff)
Diffstat (limited to 'test/Sema/pragma-weak.c')
-rw-r--r--test/Sema/pragma-weak.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/pragma-weak.c b/test/Sema/pragma-weak.c
new file mode 100644
index 000000000000..c14125eac9f7
--- /dev/null
+++ b/test/Sema/pragma-weak.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s
+
+void __both3(void);
+#pragma weak both3 = __both3 // expected-note {{previous definition}}
+void both3(void) __attribute((alias("__both3"))); // expected-error {{redefinition of 'both3'}}
+void __both3(void) {}
+
+void __a3(void) __attribute((noinline));
+#pragma weak a3 = __a3 // expected-note {{previous definition}}
+void a3(void) __attribute((alias("__a3"))); // expected-error {{redefinition of 'a3'}}
+void __a3(void) {}