summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/synth9.C
blob: 86b8ddfefa2490f1ad897c9b270a5fd2ef44e067 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// { dg-do assemble  }
// PRMS Id: 6837
// Bug: anonymous union confuses g++.

struct my_key {
   my_key(const my_key&);
   my_key(const char* n);
};

struct my_node {
   my_node(my_key&);
   union {
      long cnt;
      my_node* next;
   };
   my_key a;
};

extern my_node n;
my_node a(n);