From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102850 invoked by alias); 30 Mar 2018 12:18:50 -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 102831 invoked by uid 89); 30 Mar 2018 12:18:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=states X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Mar 2018 12:18:47 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 20B8E13354; Fri, 30 Mar 2018 14:18:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id 1CD9411DDB; Fri, 30 Mar 2018 14:18:45 +0200 (CEST) Received: from [78.35.131.140] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5abe2b25-02b7-7f0000012729-7f0000018d82-1 for ; Fri, 30 Mar 2018 14:18:45 +0200 Received: from [192.168.178.68] (xdsl-78-35-131-140.netcologne.de [78.35.131.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA; Fri, 30 Mar 2018 14:18:42 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, testsuite, committed] Remove illegal code from substr_6.f90 Message-ID: Date: Fri, 30 Mar 2018 12:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------585F5E47A552406745F1A54C" X-SW-Source: 2018-03/txt/msg00207.txt.bz2 This is a multi-part message in MIME format. --------------585F5E47A552406745F1A54C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 525 Hello world, F2003, 6.1.1. "Substrings" states that Both the starting point and the ending point shall be within the range 1, 2, ..., n unless the starting point exceeds the ending point, in which case the substring has length zero. The attached patch, which corrects the test case, has been committed as obvious. What's left is the accepts-invalid bug. Regards Thomas 2018-03-30 Thomas Koenig PR fortran/85130 * gfortran.dg/substr_6.f90: Remove illegal test for out-of-bounds substring. --------------585F5E47A552406745F1A54C Content-Type: text/x-patch; name="p_substr.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p_substr.diff" Content-length: 412 Index: gfortran.dg/substr_6.f90 =================================================================== --- gfortran.dg/substr_6.f90 (Revision 258845) +++ gfortran.dg/substr_6.f90 (Arbeitskopie) @@ -6,8 +6,6 @@ CHARACTER*5 c(1) CHARACTER(1), parameter :: c1(5) = (/ "1", "2", "3", ACHAR(0), "5" /) -c = c0(1)(-5:-8) -if (c(1) /= " ") STOP 1 c = (/ c0(1)(1:5) /) do i=1,5 if (c(1)(i:i) /= c1(i)) STOP 2 --------------585F5E47A552406745F1A54C--