diff options
Diffstat (limited to 'test/CodeGenCXX/cast-to-ref-bool.cpp')
-rw-r--r-- | test/CodeGenCXX/cast-to-ref-bool.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGenCXX/cast-to-ref-bool.cpp b/test/CodeGenCXX/cast-to-ref-bool.cpp new file mode 100644 index 000000000000..10647205de39 --- /dev/null +++ b/test/CodeGenCXX/cast-to-ref-bool.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s + +// CHECK-LABEL: main +int main(int argc, char **argv) { + // CHECK: load i8, i8* % + // CHECK-NEXT: trunc i8 %{{.+}} to i1 + bool b = (bool &)argv[argc][1]; + return b; +} |