[Patch, Fortran] (4.4/4.5 regression) PR 43551 fix buffered writing with direct access

Tobias Burnus burnus@net-b.de
Sun Mar 28 17:27:00 GMT 2010


The bug is rather nasty. Due to the bug, the result for phonon
calculations with Quantum Espresso are wrong - however, the numbers are
only slightly off; some for instance by "just" 10%. Too small to see the
error immediately - but still the error is significant.

The problem was that the last record (record 30) was written to the
wrong spot (record 21) during I/O. While tracing the bug was quite
difficult, the fix is rather trivial: After calling lseek, the
physical_offset needs to be set to the new value.

Build and tested on x86-64-linux - and currently bootstrapping and
regtesting; if successful:
OK for the trunk and the 4.4 branch?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: direct-io.diff
Type: text/x-patch
Size: 2312 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100328/713a6929/attachment.bin>


More information about the Gcc-patches mailing list