[Bug libstdc++/10797] filebuf.open() locks when using -lpthread on MIPS

toojays@toojays.net gcc-bugzilla@gcc.gnu.org
Tue Jun 17 07:44:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10797



------- Additional Comments From toojays@toojays.net  2003-06-17 07:38 -------
Dara, 
 
I don't have a gcc-3.3 set up for MIPS at the moment. I should be able to
organise this within the next 30 days or so. 
 
If anyone watching is interested, the original code is: 
 
#include <fstream> 
#include <iostream> 
#include <istream> 
 
class foo 
{ 
private: 
 std::filebuf fb; 
 std::istream is; 
 
public: 
 foo(); 
 void do_foo(); 
}; 
 
foo::foo() : is(&fb) {}; 
 
void foo::do_foo() 
{ 
 
 fb.open("file1", std::ios::in); 
 std::cout << "Opened file1" << std::endl; 
 fb.close(); 
 std::cout << "Closed file1" << std::endl; 
} 
 
int main() 
{ 
 foo().do_foo(); 
 return 0; 
}



More information about the Gcc-bugs mailing list