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