Nic Ferrier writes: > The bug is really strange, the file handle fnum is being set to -1 > before ::close() is called. Try to disassemble a bit of what's before closed is called. > Or should I report it as a fault? If so to whom? Report it to gcc-bugs if you think there's a bug. You can file a PR too. It definitively looks like it should end up in C++ land. ./A