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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c
index 616f3fcda1a..d9d23edb3cf 100644
--- a/clang/test/Sema/address_spaces.c
+++ b/clang/test/Sema/address_spaces.c
@@ -4,7 +4,11 @@
#define _AS2 __attribute__((address_space(2)))
#define _AS3 __attribute__((address_space(3)))
-void foo(_AS3 float *a) {
+void bar(_AS2 int a); // expected-error {{parameter may not be qualified with an address space}}
+
+void foo(_AS3 float *a,
+ _AS1 float b) // expected-error {{parameter may not be qualified with an address space}}
+{
_AS2 *x;// expected-warning {{type specifier missing, defaults to 'int'}}
_AS1 float * _AS2 *B;
@@ -21,7 +25,7 @@ void foo(_AS3 float *a) {
// chosen specifically to overflow 32 bits and come out reasonable
__attribute__((address_space(4294967500))) int *_boundsD; // expected-error {{address space is larger than the maximum supported}}
- *a = 5.0f;
+ *a = 5.0f + b;
}
struct _st {
OpenPOWER on IntegriCloud