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