https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121234

--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The original test case is rather clever. With this slightly modified, placing
quotes around the 'string' in the buffer.

      character(80) buffer,a
      buffer="'33;44'"
      print *, buffer
      read(buffer,*,decimal="point") a
      print*,a
      end

We get:

$ gfc -g -static pr121234.f90 
$ ./a.out 
 '33;44'                                                                        
 33;44                               

Without the quotes added in and using comma as a valid string separator:

      character(80) buffer,a
      buffer="33,44"
      print *, buffer
      read(buffer,*,decimal="point") a
      print*,a
      end

$ gfc -g -static pr121234.f90 
$ ./a.out 
 33,44                                                                          
 33          

When reading strings, not enclosed in quotes, commas and semi-colons are valid
separators.

Now I go read the details in the standard.

Reply via email to