[flang] Add UNSIGNED (#113504)
[llvm-project.git] / clang / test / CodeGen / 2008-01-25-ZeroSizedAggregate.c
blob3ffcc7b0c57876f5037cad1093935304c6468d28
1 // RUN: %clang_cc1 %s -emit-llvm -o -
2 // REQUIRES: LP64
4 // Aggregates of size zero should be dropped from argument list.
5 typedef long int Tlong;
6 struct S2411 {
7 __attribute__((aligned)) Tlong:0;
8 };
10 extern struct S2411 a2411[5];
11 extern void checkx2411(struct S2411);
12 void test2411(void) {
13 checkx2411(a2411[0]);
16 // Proper handling of zero sized fields during type conversion.
17 typedef unsigned long long int Tal2ullong __attribute__((aligned(2)));
18 struct S2525 {
19 Tal2ullong: 0;
20 struct {
21 } e;
23 struct S2525 s2525;
25 struct {
26 signed char f;
27 char :0;
28 struct{}h;
29 char * i[5];
30 } data;
32 // Taking address of a zero sized field.
33 struct Z {};
34 struct Y {
35 int i;
36 struct Z z;
38 void *f(struct Y *y) {
39 return &y->z;