diff options
Diffstat (limited to 'clang/test/CodeGen/2005-03-05-OffsetOfHack.c')
-rw-r--r-- | clang/test/CodeGen/2005-03-05-OffsetOfHack.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2005-03-05-OffsetOfHack.c b/clang/test/CodeGen/2005-03-05-OffsetOfHack.c new file mode 100644 index 0000000..4420981 --- /dev/null +++ b/clang/test/CodeGen/2005-03-05-OffsetOfHack.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - + +struct s { + unsigned long int field[0]; +}; + +#define OFFS \ + (((char *) &((struct s *) 0)->field[0]) - (char *) 0) + +int foo[OFFS]; + + |