This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/36857] Non-English locale breaks gfortran float formatting ("printf is broken")
- From: "pav at iki dot fi" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2008 18:58:22 -0000
- Subject: [Bug libfortran/36857] Non-English locale breaks gfortran float formatting ("printf is broken")
- References: <bug-36857-16480@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pav at iki dot fi 2008-07-19 18:58 -------
Does setting the locale to POSIX in the above patch fix the issue if the
program using the runtime for example changes the locale just before calling a
Fortran routine that does some printing?
Also, does the locale change affect other parts of the program calling the
gfortran runtime? If the program is threaded? If yes, just changing the locale
may cause some unexpected problems for the caller.
The reason I noticed this bug was that a user of the Scipy library (a
scientific library, for Python, that includes some routines written in Fortran)
was experiencing a mysterious "printf is broken" error when writing a program
using the library. In this case at least, locale was probably changed after
libgfortran was loaded, and it would be unexpected if calling a Fortran routine
changed the locale.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36857