summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp')
-rw-r--r--clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp b/clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
new file mode 100644
index 0000000..f842f95
--- /dev/null
+++ b/clang/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -emit-llvm %s -o -
+// rdar://5914926
+
+struct bork {
+ struct bork *next_local;
+ char * query;
+};
+int offset = (char *) &(((struct bork *) 0x10)->query) - (char *) 0x10;