summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/address_spaces.c2
-rw-r--r--clang/test/Sema/invalid-assignment-constant-address-space.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c
index 3fe93155451..018a8521bfc 100644
--- a/clang/test/Sema/address_spaces.c
+++ b/clang/test/Sema/address_spaces.c
@@ -20,7 +20,7 @@ void foo(_AS3 float *a,
_AS1 int arrarr[5][5]; // expected-error {{automatic variable qualified with an address space}}
__attribute__((address_space(-1))) int *_boundsA; // expected-error {{address space is negative}}
- __attribute__((address_space(0x7FFFFF))) int *_boundsB;
+ __attribute__((address_space(0x7FFFFF))) int *_boundsB; // expected-error {{address space is larger than the maximum supported}}
__attribute__((address_space(0x1000000))) int *_boundsC; // expected-error {{address space is larger than the maximum supported}}
// 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}}
diff --git a/clang/test/Sema/invalid-assignment-constant-address-space.c b/clang/test/Sema/invalid-assignment-constant-address-space.c
deleted file mode 100644
index 77d6b331c20..00000000000
--- a/clang/test/Sema/invalid-assignment-constant-address-space.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
-
-#define OPENCL_CONSTANT 8388354
-int __attribute__((address_space(OPENCL_CONSTANT))) c[3] = {0};
-
-void foo() {
- c[0] = 1; //expected-error{{read-only variable is not assignable}}
-}
OpenPOWER on IntegriCloud