2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / reload1.C
blob0d8fb894e4e10fb29d6f2ca6f5e01231cd1a391b
1 // PR 7944
2 // { dg-do compile }
3 // { dg-options -O2 }
5 struct B
7   B & operator << (short s)
8   {
9     int j;
10     if (j)
11         return operator << (s);
12     else
13         return operator << (s);
14   }
17 struct A
19   int i;
20   static void bar ();
21   static int quux ()
22   {
23     bar ();
24     return 0;
25   }
27   A ():i (quux ())
28   {
29   }
30   ~A ()
31   {
32   }
35 void
36 foo ()
38   short s[4] = { 0, 0, 0, 1 };
39   A a[2] = { A (), A () };
41   B b;
42   b << s[0] << s[2];