[Bug fortran/47007] Values from namelist file should not depend on locale settings

2012-07-05 Thread jtappin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47007

--- Comment #17 from JTappin  2012-07-05 23:03:00 UTC 
---
Created attachment 27748
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27748
Testcase for List-directed read

By default gtk_init calls setlocale, so if the locale is set to one that uses
comma for decimal, the attached code fails to read the numbers after the
decimal in the case with the point. However neither before or after is the
cases with the comma handled as a decimal:

james@amarice-4 Dev $ export LC_ALL=de_DE.UTF8
james@amarice-4 Dev $ ./a.out 
   100.34560   100.0
   100.0   100.0
james@amarice-4 Dev $ export LC_ALL=
james@amarice-4 Dev $ ./a.out 
   100.34560   100.0
   100.34560   100.0
james@amarice-4 Dev $ 


N.B. I do have a work-around for gtk-fortran by adding a call to
gtk_disable_setlocale, which I will add to the gtk_init routine.


[Bug fortran/56132] New: Lengths incorrect on assignment to an allocatable character scalar.

2013-01-28 Thread jtappin at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56132



 Bug #: 56132

   Summary: Lengths incorrect on assignment to an allocatable

character scalar.

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: jtap...@gmail.com





Created attachment 29296

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29296

Code demonstrating the problem



When I run the attached program with gfortran (4.7.2), the length appears to be

that of the previous assignment, e.g.:

./a.out 

String :_

   0 

   0 

String :_

   0 

   4 

String :_77

   4 

   4 77  

String :_why does this happen

   4 77  

   2 wh