diff options
Diffstat (limited to 'test/Sema/pragma-weak.c')
-rw-r--r-- | test/Sema/pragma-weak.c | 11 |
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 0000000..c14125e --- /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) {} |