summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/expr-address-of.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/expr-address-of.c')
-rw-r--r--clang/test/Sema/expr-address-of.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/Sema/expr-address-of.c b/clang/test/Sema/expr-address-of.c
index f085b6012a0..5f46b630467 100644
--- a/clang/test/Sema/expr-address-of.c
+++ b/clang/test/Sema/expr-address-of.c
@@ -10,6 +10,11 @@ void test() {
void foo() {
register int x[10];
&x[10]; // expected-error {{address of register variable requested}}
+
+ register int *y;
+
+ int *x2 = &y; // expected-error {{address of register variable requested}}
+ int *x3 = &y[10];
}
OpenPOWER on IntegriCloud