summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/attr-section.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-section.c b/clang/test/Sema/attr-section.c
index c64b10d80ff..2fb4dbd6bfd 100644
--- a/clang/test/Sema/attr-section.c
+++ b/clang/test/Sema/attr-section.c
@@ -19,3 +19,7 @@ void __attribute__((section("foo,zed"))) test2(void); // expected-note {{previou
void __attribute__((section("bar,zed"))) test2(void) {} // expected-warning {{section does not match previous declaration}}
enum __attribute__((section("NEAR,x"))) e { one }; // expected-error {{'section' attribute only applies to functions, methods, properties, and global variables}}
+
+extern int a; // expected-note {{previous declaration is here}}
+int *b = &a;
+extern int a __attribute__((section("foo,zed"))); // expected-warning {{section attribute is specified on redeclared variable}}
OpenPOWER on IntegriCloud