2018-10-23 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr66726.C
blobfb103cd0ad0733d544c2d785cd92412bf86b5548
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 /* Execution test for converting VIEW_CONVERT_EXPR.  */
6 struct cpp_num {
7   bool f;
8 };
10 extern cpp_num  __attribute__((noinline))
11 foo (cpp_num lhs,
12      cpp_num rhs)
14   lhs.f = lhs.f || rhs.f;
15   return lhs;
18 cpp_num lhs, rhs, r;
20 int main ()
23   lhs.f = false;
24   rhs.f = false;
25   r = foo (lhs, rhs);
26   if (r.f)
27     __builtin_abort ();
30   lhs.f = false;
31   rhs.f = true;
32   r = foo (lhs, rhs);
33   if (!r.f)
34     __builtin_abort ();