summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/offsetof.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/offsetof.c')
-rw-r--r--clang/test/Sema/offsetof.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/offsetof.c b/clang/test/Sema/offsetof.c
index 5fd2a30eb7e..0d33b775519 100644
--- a/clang/test/Sema/offsetof.c
+++ b/clang/test/Sema/offsetof.c
@@ -35,3 +35,13 @@ int v2 = (int)(&((struct s2 *) 0)->a) == 0 ? 0 : f();
struct s3 { int a; };
int v3 = __builtin_offsetof(struct s3, a) == 0 ? 0 : f();
+
+// PR3396
+struct sockaddr_un {
+ unsigned char sun_len;
+ char sun_path[104];
+};
+int a(int len) {
+int a[__builtin_offsetof(struct sockaddr_un, sun_path[len+1])];
+}
+
OpenPOWER on IntegriCloud