summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ext/anon1.C
blob: 6fc6d2e91f54bb044a51fc1ccadd48ff02a4b78a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do run  }
// { dg-options "" }

union U {
  struct { int i; int j; };
  int a[2];
};

int main ()
{
  U u;
  u.i = 42;
  u.a[1] = 24;
  return u.j != 24 || u.a[0] != 42;
}