From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53950 invoked by alias); 12 Feb 2018 20:54:25 -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 53929 invoked by uid 89); 12 Feb 2018 20:54:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=AIX, aix X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Feb 2018 20:54:23 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id D583D12805; Mon, 12 Feb 2018 21:54:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id CF38B11D87; Mon, 12 Feb 2018 21:54:20 +0100 (CET) Received: from [78.35.153.101] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 5a81fefc-02b7-7f0000012729-7f0000019fab-1 for ; Mon, 12 Feb 2018 21:54:20 +0100 Received: from [192.168.178.20] (xdsl-78-35-153-101.netcologne.de [78.35.153.101]) (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; Mon, 12 Feb 2018 21:54:19 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, testcase, fortran, committed] Fix read_dir.f90 Message-ID: Date: Mon, 12 Feb 2018 20:54: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: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00074.txt.bz2 Hello world, I just committed (in two attempts...) the patch below as obvious. Reading a byte is fine on some operating systems, just not on Linux. I verified this on AIX first. I'll keep the PR open for a few days to see if this fix really works on all affected system. Regards Thomas -! { dg-do run { xfail *-*-freebsd* *-*-dragonfly* hppa*-*-hpux* powerpc-ibm-aix* } } +! { dg-do run } ! PR67367 program bug implicit none @@ -12,7 +11,7 @@ program bug call abort end if read(10, iostat=ios) c - if (ios.ne.21) then + if (ios.ne.21.and.ios.ne.0) then close(10, status='delete') call abort end if