aboutsummaryrefslogtreecommitdiff
path: root/test/builtin-offsetof.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/builtin-offsetof.c')
-rw-r--r--test/builtin-offsetof.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/builtin-offsetof.c b/test/builtin-offsetof.c
new file mode 100644
index 0000000..1737d0e
--- /dev/null
+++ b/test/builtin-offsetof.c
@@ -0,0 +1,9 @@
+struct s {
+ struct {
+ union {
+ float z;
+ char *c;
+ } b;
+ } a[5];
+};
+int x = __builtin_offsetof(struct s, a[2].b.c);