http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51193
Bug #: 51193 Summary: std::cout is behaving strangely Classification: Unclassified Product: gcc Version: 4.5.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: pva89c...@ya.ru cout<<rCount(5, 0, arr1) in http://pastebin.com/t62Yamen does 32767 if you change cout<< rCount(...) by cout<<"smth"<<rCount(...) all right cout<<"test"<<rCount(5, 0, arr1) does 0