This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/21459] strings of different length in a single character(len=*) declaration


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-05-09 11:15 -------
Reduced testcase is following. The root of the problem is that when we declare
strings of different length in the same "character(len=*)" declaration, all
strings are truncated to the length of the first one. Example:

$ cat pr21459.f90
  character(len=*) :: c1='12345', c2='123456789'
  print *, c1
  print *, c2
  end
$ gfortran pr21459.f90 && ./a.out
 12345
 12345

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
OtherBugsDependingO|                            |19276
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-09 11:15:34
               date|                            |
            Summary|Fortran runtime error:      |strings of different length
                   |Unexpected end of format    |in a single character(len=*)
                   |string                      |declaration


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]