This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/21459] strings of different length in a single character(len=*) declaration
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2005 11:15:41 -0000
- Subject: [Bug libfortran/21459] strings of different length in a single character(len=*) declaration
- References: <20050509032552.21459.kamaraju@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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