Debian Codegraph @

gcc/testsuite/g++.dg/torture/pr84233.C

raw
1 // { dg-do compile }
2 // { dg-additional-options "-w" }
3
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 }
20 };
21 struct : d {
22 } m, n;
23 bool o;
24 void p() { (o ? m : n) ? (void)0 : a("", 5, "", ""); }
25