2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr83608.C
blob555e5877e75022951394aec42cd491b4f3aeb18a
1 // PR middle-end/83608
2 // { dg-do compile }
3 // { dg-options "-O2" }
5 template <typename> class B;
6 template <> struct B<float>
8   float foo () { return __real__ b; }
9   _Complex double b;
12 void bar (int);
14 template <class T>
15 void
16 baz ()
18   B<T> h;
19   T *a = (T *) &h;
20   a[0] = a[1] = 6;
21   h.foo () ? void () : bar (7);
24 int
25 main ()
27   baz<float> ();