diff options
Diffstat (limited to 'clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp b/clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp new file mode 100644 index 0000000..36f911e --- /dev/null +++ b/clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -emit-llvm %s -o /dev/null + +void test(unsigned char *b, int rb) { + typedef unsigned char imgfoo[10][rb]; + imgfoo &br = *(imgfoo *)b; + + br[0][0] = 1; + + rb = br[0][0]; +} |