From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 123621 invoked by alias); 24 Oct 2015 19:29:48 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 123591 invoked by uid 89); 24 Oct 2015 19:29:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: nef2.ens.fr Received: from nef2.ens.fr (HELO nef2.ens.fr) (129.199.96.40) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Oct 2015 19:29:47 +0000 Received: from mailhost.lps.ens.fr (tournesol.lps.ens.fr [129.199.120.1]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id t9OJTime008702 ; Sat, 24 Oct 2015 21:29:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mailhost.lps.ens.fr (Postfix) with ESMTP id 2FD4D141; Sat, 24 Oct 2015 21:29:44 +0200 (CEST) Received: from mailhost.lps.ens.fr ([127.0.0.1]) by localhost (tournesol.lps.ens.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DqPyx8zN13r8; Sat, 24 Oct 2015 21:29:44 +0200 (CEST) Received: from book15.home (AClermont-Ferrand-551-1-236-34.w86-207.abo.wanadoo.fr [86.207.183.34]) by mailhost.lps.ens.fr (Postfix) with ESMTPSA id E530D13E; Sat, 24 Oct 2015 21:29:43 +0200 (CEST) From: =?utf-8?Q?Dominique_d=27Humi=C3=A8res?= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] PR fortran/67805 -- Check for invalid charlength Date: Sat, 24 Oct 2015 19:29:00 -0000 Message-Id: Cc: paul Thomas , gfortran , gcc-patches To: Steve Kargl Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-SW-Source: 2015-10/txt/msg00125.txt.bz2 At revision r229288 compiling the following test implicit none type :: template_t integer :: type character(256) :: charset1, charset2 integer :: len1, len2 end type template_t contains subroutine match_quoted (tt, s, n, range) type(template_t), intent(in) :: tt character(*), intent(in) :: s integer, intent(out) :: n integer, dimension(2), intent(out) :: range character(tt%len1) :: ch1 character(tt%len2) :: ch2 integer :: i ch1 = tt%charset1 if (s(1:tt%len1) == ch1) then ch2 = tt%charset2 do i = tt%len1 + 1, len (s) - tt%len2 + 1 if (s(i:i+tt%len2-1) == ch2) then n = i + tt%len2 - 1 range(1) = tt%len1 + 1 range(2) = i - 1 return end if end do n = -1 range = 0 else n = 0 range = 0 end if end subroutine match_quoted end gives the following errors pr40440_red_1.f90:16:14: character(tt%len1) :: ch1 1 Error: Scalar INTEGER expression expected at (1) pr40440_red_1.f90:17:14: character(tt%len2) :: ch2 1 Error: Scalar INTEGER expression expected at (1) pr40440_red_1.f90:19:7: ch1 = tt%charset1 1 Error: Symbol 'ch1' at (1) has no IMPLICIT type pr40440_red_1.f90:21:10: ch2 = tt%charset2 1 Error: Symbol 'ch2' at (1) has no IMPLICIT type while it compiles without error at r229261. TIA Dominique