This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37076] New: Concatenation of KIND=4 strings with KIND=4 parameters fails
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2008 04:31:00 -0000
- Subject: [Bug fortran/37076] New: Concatenation of KIND=4 strings with KIND=4 parameters fails
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This program illustrates the problem. I think this is a rejects valid. At the
point of failure in resolve.c, one of the operands has kind=1 for some reason.
program test3
integer,parameter :: u = 4
character(1,u),parameter :: nen=char(int(z'5e74'),u) !year
character(25,u) :: string
string = u_"2008"//nen
print *, u_"2008"//nen ! Compiles OK
print *, u_"2008"//nen//u_"8" ! Rejects this.
end program test3
$ gfc concat.f90
concat.f90:7.10:
print *, u_"2008"//nen//u_"8" ! Rejects this.
1
Error: Operands of string concatenation operator at (1) are
CHARACTER(1)/CHARACTER(4)
--
Summary: Concatenation of KIND=4 strings with KIND=4 parameters
fails
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37076