1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o %t 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc // PR2910 4*f4a2713aSLionel Sambuc struct sockaddr_un { 5*f4a2713aSLionel Sambuc unsigned char sun_len; 6*f4a2713aSLionel Sambuc char sun_path[104]; 7*f4a2713aSLionel Sambuc }; 8*f4a2713aSLionel Sambuc test(int len)9*f4a2713aSLionel Sambucint test(int len) { 10*f4a2713aSLionel Sambuc return __builtin_offsetof(struct sockaddr_un, sun_path[len+1]); 11*f4a2713aSLionel Sambuc } 12*f4a2713aSLionel Sambuc 13