1 // PR sanitizer/81929 2 // { dg-do compile } 3 // { dg-options "-std=c++14 -fsanitize=undefined" } 4 5 struct S { S &operator<< (long); S foo (); S (); }; 6 7 void bar()8bar () 9 { 10 static_cast<S&>(S () << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 11 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 12 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 13 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0).foo (); 14 } 15