https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61847
--- Comment #6 from kargl at gcc dot gnu.org ---
(In reply to kargl from comment #4)
> (In reply to e2cd58e1 from comment #3)
> > but what I want to do is read in values with point as decimal separator.
> > Using
> >
> > open(unit=1,file='bug.dat', decimal="point")
> >
> > doesn't seem to change anything.
>
> gfortran's IO for floating point numbers using the operating
> systems strtof, strtod, and strtold. Are you sure that these
> functions on yuor OS actual have working locale support?
Yeah, replying to myself.
What happens if you give strtod "1.2345' and "1,2345" in
your locale? I missed a section of code in io/read.c:
case ',':
if (dtp->u.p.current_unit->decimal_status != DECIMAL_COMMA)
goto bad_float;
/* Fall through. */
case '.':
if (seen_dp)
goto bad_float;
if (!seen_int_digit)
*(out++) = '0';
*(out++) = '.';
seen_dp = 1;
break;
This implicitly changes a comma into a decimal point prior to the
call to strtod.