From patchwork Thu May 2 10:33:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 240933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 9D4F42C00AB for ; Thu, 2 May 2013 20:34:02 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=mDMOvRuFoAQI3nTfhyWza2SIQUJ7cNissuLdOZJKb73BNw fZedEpV+tN6uTI+o3WLa2/sDzd+opRgsce9H8ASP3OXbFMn12zuVCitp64S9m7P0 OlmQtGiw67cUiVF8YYreTxG3WK+sYaT2/v/xHjWLsDIuHN+/uN/pGUbF8fqXE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=GCyQn7AGW/WOlmTWvMdrowBA//E=; b=DsvaqHqKPwqXTiDpEMIu XJfKFyS0EMHOYwft52GrBjVcpmc4mgvJFCtGaXnkYl8da2sZlvoaeVxWGdaZ/YD+ DHdQFNOlJb8nGjhkLtV2Zl4WEmEgDE9qWwsiVKrXAGGsH+yfGcW1y4maZDYSKLF3 e3EpV7t1TFS2B/eFuG3piqI= Received: (qmail 20842 invoked by alias); 2 May 2013 10:33:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 20825 invoked by uid 89); 2 May 2013 10:33:56 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 02 May 2013 10:33:55 +0000 Received: from archimedes.net-b.de (port-92-195-76-58.dynamic.qsc.de [92.195.76.58]) by mx02.qsc.de (Postfix) with ESMTP id C97642B848; Thu, 2 May 2013 12:33:51 +0200 (CEST) Message-ID: <5182410F.1050500@net-b.de> Date: Thu, 02 May 2013 12:33:51 +0200 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Fortran-dev, committed] scan-dump fix, iso_ts29113.c lower_bound corrections X-Virus-Found: No I have committed the attached patch to the Fortran-dev branch (Rev. 198513). Dump scan: Using scan-tree-dump-times does not seem to handle patterns; thus, scan-tree-dump is now used. runtime/iso_ts29113.c: Correctly set lower_bound for CFI_establish and CFI_select_part, I think it should now match the standard. For CFI_is_contiguous, I missed to handle negative strides. Tobias Index: gcc/testsuite/ChangeLog.fortran-dev =================================================================== --- gcc/testsuite/ChangeLog.fortran-dev (Revision 198512) +++ gcc/testsuite/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,3 +1,7 @@ +2013-05-02 Tobias Burnus + + * gfortran.dg/iso-ts-29113_2.f90: Update scan-dump. + 2013-04-30 Tobias Burnus * gfortran.dg/iso-ts-29113_2.f90: New. Index: gcc/testsuite/gfortran.dg/iso-ts-29113_2.f90 =================================================================== --- gcc/testsuite/gfortran.dg/iso-ts-29113_2.f90 (Revision 198512) +++ gcc/testsuite/gfortran.dg/iso-ts-29113_2.f90 (Arbeitskopie) @@ -125,8 +125,8 @@ ! { dg-final { scan-tree-dump-times "x_str1b.type = 261;" 1 "original" } } ! { dg-final { scan-tree-dump-times "x_str4a.type = 1029;" 1 "original" } } ! { dg-final { scan-tree-dump-times "x_str4b.type = 1029;" 1 "original" } } -! { dg-final { scan-tree-dump-times "x_cptr.type = (1025|2049);" 1 "original" } } -! { dg-final { scan-tree-dump-times "x_funcptr.type = (1025|2049);" 1 "original" } } +! { dg-final { scan-tree-dump "x_cptr.type = (1025|2049);" "original" } } +! { dg-final { scan-tree-dump "x_funcptr.type = (1025|2049);" "original" } } ! { dg-final { scan-tree-dump-times "x_seq.type = 6;" 1 "original" } } ! { dg-final { scan-tree-dump-times "x_bindc.type = 6;" 1 "original" } } ! { dg-final { scan-tree-dump-times "x_ext.type = -1;" 1 "original" } } Index: libgfortran/ChangeLog.fortran-dev =================================================================== --- libgfortran/ChangeLog.fortran-dev (Revision 198512) +++ libgfortran/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,3 +1,9 @@ +2013-05-02 Tobias Burnus + + * runtime/iso_ts29113.c (CFI_establish, CFI_select_part): + Correctly set lower_bound. + (CFI_is_contiguous): Handle negative strides. + 2013-04-30 Tobias Burnus * ISO_Fortran_binding.h.tmpl (CFI_cdesc_t): Change order Index: libgfortran/runtime/iso_ts29113.c =================================================================== --- libgfortran/runtime/iso_ts29113.c (Revision 198512) +++ libgfortran/runtime/iso_ts29113.c (Arbeitskopie) @@ -169,7 +169,7 @@ sm = dv->elem_len; for (i = 0; i < rank; i++) { - dv->dim[i].lower_bound = 0; /* Note: Only required for pointers. */ + dv->dim[i].lower_bound = 0; dv->dim[i].extent = extents[i]; dv->dim[i].sm = sm; sm *= extents[i]; @@ -196,7 +196,7 @@ size = dv->elem_len; for (i = 1; i < dv->rank; i++) { - if (size < dv->dim[i].sm) + if (size < dv->dim[i].sm || dv->dim[i].sm < 0) return 0; size *= dv->dim[i].sm; } @@ -314,8 +314,7 @@ for (i = 1; i < result->rank; i++) { - result->dim[i].lower_bound = result->attribute == CFI_attribute_other - ? 0 : source->dim[i].lower_bound; + result->dim[i].lower_bound = source->dim[i].lower_bound; result->dim[i].extent = source->dim[i].extent; result->dim[i].sm = source->dim[i].sm; }