Evan Cheng | 6bccafd | 2008-01-26 00:35:43 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc %s -S -o - |
| 2 | |
| 3 | // Aggregates of size zero should be dropped from argument list. |
| 4 | typedef long int Tlong; |
| 5 | struct S2411 { |
| 6 | __attribute__((aligned)) Tlong:0; |
| 7 | }; |
| 8 | |
| 9 | extern struct S2411 a2411[5]; |
| 10 | extern void checkx2411(struct S2411); |
| 11 | void test2411(void) { |
| 12 | checkx2411(a2411[0]); |
| 13 | } |
| 14 | |
| 15 | // A field that is an aggregates of size zero should be dropped during |
| 16 | // type conversion. |
| 17 | typedef unsigned long long int Tal2ullong __attribute__((aligned(2))); |
| 18 | struct S2525 { |
| 19 | Tal2ullong: 0; |
| 20 | struct { |
| 21 | } e; |
| 22 | }; |
| 23 | struct S2525 s2525; |
Devang Patel | 15b86db | 2008-01-26 01:21:48 +0000 | [diff] [blame^] | 24 | |
| 25 | struct { |
| 26 | signed char f; |
| 27 | char :0; |
| 28 | struct{}h; |
| 29 | char * i[5]; |
| 30 | } data; |
| 31 | |