summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/address_spaces.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/address_spaces.c')
-rw-r--r--clang/test/Sema/address_spaces.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c
index 38b51b29126..a53bb4da000 100644
--- a/clang/test/Sema/address_spaces.c
+++ b/clang/test/Sema/address_spaces.c
@@ -39,3 +39,8 @@ void * get_0(void) {
return base[0]; // expected-error {{returning '__attribute__((address_space(256))) void *' from a function with result type 'void *' changes address space of pointer}}
}
+__attribute__((address_space(1))) char test3_array[10];
+void test3(void) {
+ extern void test3_helper(char *p); // expected-note {{passing argument to parameter 'p' here}}
+ test3_helper(test3_array); // expected-error {{changes address space of pointer}}
+}
OpenPOWER on IntegriCloud