-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gfortran bug for string_type UDDTIO? #354
Comments
I can confirm that this bug also happens with gfortran 8, 9 and 10 on Windows x64. |
Well, this is disappointing. When implementing the formatted read I had to drop the I would take option three from the table, because that was exactly the intended use. I will check with the NAG compiler if I find some time to get a third opinion here. There is a fair chance I messed up something in the implementation. To read a whole line in the string I'm using a non-advancing read over chunks which will always trigger end of record, which is an implementation detail and should be caught and removed in the UDDTIO implementation. This is done by setting stdlib/src/stdlib_string_type.f90 Lines 1070 to 1072 in 6050923
Apparently this is still insufficient? |
NAG fails in the UDDTIO at stdlib/src/stdlib_string_type.f90 Lines 1063 to 1064 in 6050923
and returns an iostat/iomsg which don't look right:
So no tiebreaker here. |
Also the error status returned by GFortran after the second read is |
I think I found a hint on this issue, you set the stdlib/src/stdlib_string_type.f90 Line 1134 in bc37bcc
You will find that File
But the output shows after two reads:
Which is both the wrong line and the wrong length of the raw value. |
I have the following simple program that writes three lines to a file and then reads the same three lines using
string_type
UDDTIO:With gfortran (10.1.0) only the first line is printed back, whereas Intel fortran (2021.1.2) prints all three lines.
Is this a bug in stdlib_string_type, a bug in gfortran UDDTIO, or have I done something wrong with my use of
string_type
?(I'm using the stdlib-fpm package which is at stdlib commit b522bbb).
The text was updated successfully, but these errors were encountered: