Shrink Thumb2 movcc instructions.
[llvm/avr.git] / test / FrontendC / 2008-01-25-ZeroSizedAggregate.c
blob643caffb6d2ac35fc31c50b3e61a59e312c1b771
1 // RUN: %llvmgcc %s -S -o -
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 };
9 extern struct S2411 a2411[5];
10 extern void checkx2411(struct S2411);
11 void test2411(void) {
12 checkx2411(a2411[0]);
15 // Proper handling of zero sized fields during type conversion.
16 typedef unsigned long long int Tal2ullong __attribute__((aligned(2)));
17 struct S2525 {
18 Tal2ullong: 0;
19 struct {
20 } e;
22 struct S2525 s2525;
24 struct {
25 signed char f;
26 char :0;
27 struct{}h;
28 char * i[5];
29 } data;
31 // Taking address of a zero sized field.
32 struct Z {};
33 struct Y {
34 int i;
35 struct Z z;
37 void *f(struct Y *y) {
38 return &y->z;