From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11116 invoked by alias); 11 Aug 2008 04:32:21 -0000 Received: (qmail 10742 invoked by uid 48); 11 Aug 2008 04:31:00 -0000 Date: Mon, 11 Aug 2008 04:32:00 -0000 Subject: [Bug fortran/37076] New: Concatenation of KIND=4 strings with KIND=4 parameters fails X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jvdelisle at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00804.txt.bz2 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