[Bug fortran/121759] Windows/MinGW: formatted reads lose decimal digits after binary stream read

"Yohann.Vautrin--- via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121759

Yohann Vautrin <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected].
                   |                            |ca

--- Comment #6 from Yohann Vautrin <[email protected]> ---
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.