xref: /llvm-project/clang/test/CodeGenCXX/2005-02-20-BrokenReferenceTest.cpp (revision 3bf8310d42bad4dd2c49502f61caeb3cac376235)
1 // RUN: %clang_cc1 -emit-llvm %s -o /dev/null
2 
test(unsigned char * b,int rb)3 void test(unsigned char *b, int rb) {
4   typedef unsigned char imgfoo[10][rb];
5   imgfoo &br = *(imgfoo *)b;
6 
7   br[0][0] = 1;
8 
9   rb = br[0][0];
10 }
11