diff options
Diffstat (limited to 'test/Sema/exprs.c')
-rw-r--r-- | test/Sema/exprs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index dbb6e80aa6..b22b5220f2 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -134,3 +134,11 @@ void test18(int b) { test18_a(b, b); // expected-error {{too many arguments to function call, expected 1, have 2}} test18_a(); // expected-error {{too few arguments to function call, expected 1, have 0}} } + +// PR7569 +void test19() { + *(int*)0 = 0; // expected-warning {{indirection of non-volatile null pointer}} \ + // expected-note {{consider using __builtin_trap}} + *(volatile int*)0 = 0; // Ok. +} + |