blob: c279e2282e460adf9f2f9f4a3488de720ba4c93d [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -emit-llvm -o %t
Eli Friedman769e4112009-01-24 22:38:55 +00002
3// PR2910
4struct sockaddr_un {
5 unsigned char sun_len;
6 char sun_path[104];
7};
8
9int test(int len) {
10 return __builtin_offsetof(struct sockaddr_un, sun_path[len+1]);
11}
12