| Daniel Dunbar | ffd408a | 2009-03-24 02:24:46 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc %s -emit-llvm -o %t |
| Eli Friedman | ccffea9 | 2009-01-24 22:38:55 +0000 | [diff] [blame] | 2 | |
| 3 | // PR2910 | ||||
| 4 | struct sockaddr_un { | ||||
| 5 | unsigned char sun_len; | ||||
| 6 | char sun_path[104]; | ||||
| 7 | }; | ||||
| 8 | |||||
| 9 | int test(int len) { | ||||
| 10 | return __builtin_offsetof(struct sockaddr_un, sun_path[len+1]); | ||||
| 11 | } | ||||
| 12 | |||||