https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847
--- Comment #13 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Tue, Jul 22, 2014 at 01:39:30AM +0000, jvdelisle at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847 > > --- Comment #11 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- > After all that has been said here, I am almost afraid to add any more. > > This is not a bug. Fortran and GFortran are not locale aware. The ',' or '.' > are read from the file or device literally as is. From this read, a numeric > string is constructed. If the unit was opened with decimal='comma' and a > comma > was seen, the comma is converted to '.'. If decimal='point' and a comma is > read, an error occurs. I never claimed it to be bug. You've simply restated what I was trying to convey in much more coherent manner in a single post. > After the above described numeric string is constructed it is passed to the > glibc library strtod (sring to double). The glibc library is locale aware and > if the locale has defined the decimal token to be a ',' (comma), it see the > decimal 'point' and interprets it as end of string conversion. I do however note that OP is using MacOS and I use FreeBSD. Neither uses glibc. strtod is a C99/POSIX specified function, so correctly implmented strtod function should give the same results (up to whether C99/POSIX requires adherence to locale).