From patchwork Wed May 4 21:52:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 94167 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]) by ozlabs.org (Postfix) with SMTP id 7DF0D1007EF for ; Thu, 5 May 2011 07:53:02 +1000 (EST) Received: (qmail 26051 invoked by alias); 4 May 2011 21:53:00 -0000 Received: (qmail 26036 invoked by uid 22791); 4 May 2011 21:52:58 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_BG, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 May 2011 21:52:42 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id A0D4C11EA5; Wed, 4 May 2011 23:52:40 +0200 (CEST) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id R27JAPxoeKnU; Wed, 4 May 2011 23:52:39 +0200 (CEST) Received: from seth.se.axis.com (seth.se.axis.com [10.0.2.172]) by ra.se.axis.com (Postfix) with ESMTP id 9607211E9E; Wed, 4 May 2011 23:52:39 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by seth.se.axis.com (Postfix) with ESMTP id 883123E13A; Wed, 4 May 2011 23:52:39 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id p44LqdF6008489; Wed, 4 May 2011 23:52:39 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id p44Lqdmp008485; Wed, 4 May 2011 23:52:39 +0200 Date: Wed, 4 May 2011 23:52:39 +0200 Message-Id: <201105042152.p44Lqdmp008485@ignucius.se.axis.com> From: Hans-Peter Nilsson To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Committed: fd_truncate test-cases updated for recent libgfortran changes MIME-Version: 1.0 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 Once or twice a year some regression results from changed I/O in libgfortran, such that some existing test-case starts calling libgfortran/io/unix.c:raw_truncate, which on limited-I/O-bare-iron targets will emit "required ftruncate or chsize support not present" and fail. After a while, I get to it and commit a patch such as the following, updating the regressing tests and new ones I spot in gfortran.log with the self-marked line above. This time, it happened in 173155:173168. Usually, there's also a brief question whether all changes were intended, or perhaps that some of the regressing tests (here: gfortran.dg/fmt_cache_1.f and gfortran.dg/ftell_3.f90) were not really supposed to have raw_truncate called. So, should they? Two of the test-cases, gfortran.dg/endfile_3.f90 and gfortran.dg/endfile_4.f90 actually pass, which seems wrong, as raw_truncate after emitting the error message returns an error indication (so, the test-program should abort or return an error AFAICT). Perhaps due to lack of error handling in the call-chain to raw_truncate? Anyway, committed as obvious. See also . gcc/testsuite: * gfortran.dg/pr47878.f90, gfortran.dg/endfile_3.f90, gfortran.dg/endfile_4.f90, gfortran.dg/ftell_3.f90, gfortran.dg/fmt_cache_1.f, gfortran.dg/namelist_66.f90: Gate test on effective_target fd_truncate. brgds, H-P Index: gfortran.dg/endfile_4.f90 =================================================================== --- gfortran.dg/endfile_4.f90 (revision 173380) +++ gfortran.dg/endfile_4.f90 (working copy) @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target fd_truncate } } ! pr44477 ENDFILE not allowed after ENDFILE !------------------------------------------- open(10, form='formatted', & Index: gfortran.dg/pr47878.f90 =================================================================== --- gfortran.dg/pr47878.f90 (revision 173380) +++ gfortran.dg/pr47878.f90 (working copy) @@ -1,5 +1,5 @@ ! PR fortran/47878 -! { dg-do run } +! { dg-do run { target fd_truncate } } integer :: a(5) open (99, recl = 40) write (99, '(5i3)') 1, 2, 3 Index: gfortran.dg/namelist_66.f90 =================================================================== --- gfortran.dg/namelist_66.f90 (revision 173380) +++ gfortran.dg/namelist_66.f90 (working copy) @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target fd_truncate } } ! PR46010 Failure to read these two examples of namelists type ptracer character(len = 2) :: sname Index: gfortran.dg/ftell_3.f90 =================================================================== --- gfortran.dg/ftell_3.f90 (revision 173380) +++ gfortran.dg/ftell_3.f90 (working copy) @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target fd_truncate } } ! PR43605 FTELL intrinsic returns incorrect position ! Contributed by Janne Blomqvist, Manfred Schwarb ! and Dominique d'Humieres. Index: gfortran.dg/endfile_3.f90 =================================================================== --- gfortran.dg/endfile_3.f90 (revision 173380) +++ gfortran.dg/endfile_3.f90 (working copy) @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target fd_truncate } } ! pr44477 READ/WRITE not allowed after ENDFILE !------------------------------------------- open(10, form='formatted', & Index: gfortran.dg/fmt_cache_1.f =================================================================== --- gfortran.dg/fmt_cache_1.f (revision 173380) +++ gfortran.dg/fmt_cache_1.f (working copy) @@ -1,4 +1,4 @@ -! { dg-do run } +! { dg-do run { target fd_truncate } } ! pr40662 segfaults when specific format is invoked twice. ! pr40330 incorrect io. ! test case derived from pr40662,