summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/empty2.c
blob: 54b98f6f0b3be7da1bff9ac4b97e91d5c8ef82c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */

double d=0;

struct A {} a; /* { dg-warning "(has no members)" } */

void foo(struct A x)
{
  d=0;
}

void bar()
{
  if (d) foo(a);
}
OpenPOWER on IntegriCloud