[Bug fortran/121759] Windows/MinGW: formatted reads lose decimal digits after binary stream read
Yohann.Vautrin@nrc-cnrc.gc.ca
gcc-bugzilla@gcc.gnu.org
Tue Jul 28 17:13:48 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121759
Yohann Vautrin <Yohann.Vautrin@nrc-cnrc.gc.ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Yohann.Vautrin@nrc-cnrc.gc.
| |ca
--- Comment #6 from Yohann Vautrin <Yohann.Vautrin@nrc-cnrc.gc.ca> ---
Created attachment 65153
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65153&action=edit
Locale-handling bug reproducer
Environment: Windows 11 23H2, amd64
- Install MSYS2
- Open Settings / Time & language / Language & region and set Regional format
to, e.g., "French (Canada)"
- Start a MSYS2 UCRT64 environment with gfortran installed with pacman (package
name is mingw-w64-ucrt-x86_64-gcc-libgfortran, version is 16.1.0-5 currently)
- Compile the attached reproducer with gfortran -Wall -Wextra -pedantic
reproducer.f90 and run it
If the bug is reproduced, the program will output this, followed by a
backtrace:
Before unformatted I/O:
- Expected: 0.10000000000000001
- Parsed : 0.10000000000000001
After unformatted I/O:
- Expected: 0.10000000000000001
- Parsed : 0.0000000000000000
ERROR STOP 2
More information about the Gcc-bugs
mailing list