http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52169
--- Comment #2 from Tomalak Geret'kal <tom at kera dot name> 2012-02-08 10:45:17 UTC --- Are you sure it's not just that in_avail is 0? Why should it be -1 here? i.e. doesn't readsome become a noop when there's nothing to read?