2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr84233.C
blobd45a830bf630bc6501c90466c3faecb0e25bbc78
1 // { dg-do compile }
2 // { dg-additional-options "-w" }
4 void a(const char *, int, const char *, const char *);
5 template <typename b> void c(b);
6 struct d {
7     long e;
8     template <typename> union f;
9     template <typename h> union f<h *> {
10         f(h *i) : j(i) {}
11         h *j;
12         long bits;
13     };
14     static int k(volatile long &i) { return *(int *)f<volatile long *>(&i).bits; }
15     typedef long g;
16     operator g() volatile {
17         int l = k(e);
18         c(l);
19     }
21 struct : d {
22          } m, n;
23 bool o;
24 void p() { (o ? m : n) ? (void)0 : a("", 5, "", ""); }