diff options
author | John McCall <rjmccall@apple.com> | 2010-12-04 12:29:11 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-04 12:29:11 +0000 |
commit | ca61b6567bab5b1d3e7210969d55e15d1177f5de (patch) | |
tree | 0baeb323e2cb7760159b8f7b1886020f1d5c3465 /clang/test/CodeGen/exprs.c | |
parent | a03eddad588659043cabca7b591a3e14c76c8875 (diff) | |
download | bcm5719-llvm-ca61b6567bab5b1d3e7210969d55e15d1177f5de.tar.gz bcm5719-llvm-ca61b6567bab5b1d3e7210969d55e15d1177f5de.zip |
First pass at implementing the intent of ANSI C DR106.
llvm-svn: 120904
Diffstat (limited to 'clang/test/CodeGen/exprs.c')
-rw-r--r-- | clang/test/CodeGen/exprs.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c index c9978b85164..452c823d15f 100644 --- a/clang/test/CodeGen/exprs.c +++ b/clang/test/CodeGen/exprs.c @@ -147,8 +147,22 @@ double f13(double X) { } // Check operations on incomplete types. -struct s14; -void f14(struct s13 *a) { +void f14(struct s14 *a) { (void) &*a; } +// CHECK: define void @f15 +void f15(void *v, const void *cv, volatile void *vv) { + extern void f15_helper(void); + f15_helper(); + // CHECK: call void @f15_helper() + // FIXME: no loads from i8* should occur here at all! + *v; *v, *v; v ? *v : *v; + *cv; *cv, *cv; v ? *cv : *cv; + *vv; *vv, *vv; vv ? *vv : *vv; + // CHECK: volatile load i8* + // CHECK: volatile load i8* + // CHECK: volatile load i8* + // CHECK-NOT: load i8* % + // CHECK: ret void +} |