summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-08-19 22:16:28 +0000
committerEric Christopher <echristo@apple.com>2011-08-19 22:16:28 +0000
commit3d8838033abf3e101fc6043da4b0907bec54a4ad (patch)
tree59e9b9d37e2b1541be876dd66dbbc653140d49e0 /test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
parent7b9bb7239efc46914980c94c2f63eacb70332d88 (diff)
Migrate 2008-05-07-CrazyOffsetOf.cpp from llvm/test/FrontendC++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp')
-rw-r--r--test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp b/test/CodeGenCXX/2008-05-07-CrazyOffsetOf.cpp
new file mode 100644
index 0000000000..f842f958e9
--- /dev/null
+++ b/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;