summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-alias-elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/attr-alias-elf.c')
-rw-r--r--clang/test/Sema/attr-alias-elf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-alias-elf.c b/clang/test/Sema/attr-alias-elf.c
index 01bc1879dc4..04d13924ac1 100644
--- a/clang/test/Sema/attr-alias-elf.c
+++ b/clang/test/Sema/attr-alias-elf.c
@@ -56,3 +56,11 @@ typedef int b4;
void test2_bar() {}
void test2_foo() __attribute__((weak, alias("test2_bar")));
void test2_zed() __attribute__((alias("test2_foo"))); // expected-warning {{alias will always resolve to test2_bar even if weak definition of alias test2_foo is overridden}}
+
+void test3_bar() { }
+void test3_foo() __attribute__((section("test"))); // expected-warning {{alias will not be in section 'test' but in the same section as the aliasee}}
+void test3_foo() __attribute__((alias("test3_bar")));
+
+__attribute__((section("test"))) void test4_bar() { }
+void test4_foo() __attribute__((section("test")));
+void test4_foo() __attribute__((alias("test4_bar")));
OpenPOWER on IntegriCloud