1 /* { dg-do run } */ 2 /* { dg-options "-O2" } */ 3 4 /* Execution test for converting VIEW_CONVERT_EXPR. */ 5 6 struct cpp_num { 7 bool f; 8 }; 9 10 extern cpp_num __attribute__((noinline)) foo(cpp_num lhs,cpp_num rhs)11foo (cpp_num lhs, 12 cpp_num rhs) 13 { 14 lhs.f = lhs.f || rhs.f; 15 return lhs; 16 } 17 18 cpp_num lhs, rhs, r; 19 main()20int main () 21 { 22 23 lhs.f = false; 24 rhs.f = false; 25 r = foo (lhs, rhs); 26 if (r.f) 27 __builtin_abort (); 28 29 30 lhs.f = false; 31 rhs.f = true; 32 r = foo (lhs, rhs); 33 if (!r.f) 34 __builtin_abort (); 35 } 36