From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42386 invoked by alias); 15 Mar 2018 17:35:32 -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 42375 invoked by uid 89); 15 Mar 2018 17:35:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Mar 2018 17:35:30 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8FFCD406802A for ; Thu, 15 Mar 2018 17:35:22 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 772D21208F85 for ; Thu, 15 Mar 2018 17:35:18 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w2FFsiHt001638; Thu, 15 Mar 2018 16:54:45 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w2FFsglH001637; Thu, 15 Mar 2018 16:54:42 +0100 Date: Thu, 15 Mar 2018 17:35:00 -0000 From: Jakub Jelinek To: "Bin.Cheng" Cc: Steve Kargl , Richard Biener , Janne Blomqvist , Fortran List , GCC Patches Subject: Re: [PATCH] Fortran -- clean up KILL Message-ID: <20180315155442.GT8577@tucnak> Reply-To: Jakub Jelinek References: <20180313040809.GA69151@troutmask.apl.washington.edu> <20180314005722.GA43280@troutmask.apl.washington.edu> <20180315141026.GA57660@troutmask.apl.washington.edu> <20180315150810.GS8577@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-03/txt/msg00067.txt.bz2 On Thu, Mar 15, 2018 at 03:45:47PM +0000, Bin.Cheng wrote: > FYI, both your patches fix the compilation issue. It isn't just a compilation problem, it really can't work at all. Without the patch, if the function builds, it looks like: 00000000002308b0 <_gfortran_kill>: 2308b0: f3 0f 1e fa endbr64 2308b4: 48 83 ec 08 sub $0x8,%rsp 2308b8: e8 f3 ff ff ff callq 2308b0 <_gfortran_kill> 2308bd: 85 c0 test %eax,%eax 2308bf: 74 07 je 2308c8 <_gfortran_kill+0x18> 2308c1: e8 4a 92 de ff callq 19b10 <__errno_location@plt> 2308c6: 8b 00 mov (%rax),%eax 2308c8: 48 83 c4 08 add $0x8,%rsp 2308cc: c3 retq 2308cd: 0f 1f 00 nopl (%rax) i.e. there is endless recursion, it doesn't call the libc kill, but itself. Jakub