From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99852 invoked by alias); 15 Mar 2018 15:57:22 -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 99524 invoked by uid 89); 15 Mar 2018 15:57:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-io0-f169.google.com Received: from mail-io0-f169.google.com (HELO mail-io0-f169.google.com) (209.85.223.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Mar 2018 15:57:20 +0000 Received: by mail-io0-f169.google.com with SMTP id l12so9126241ioc.10; Thu, 15 Mar 2018 08:57:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8HGA4YqhAAevqV57WT4837ukesj0m/VFyD9xkD3GkdE=; b=ladbxzDFNMlcrGFpL6QCZ291C6NnldqyUDAYWFkq7a2pvRNfEutXH/uW1Ep0gWPcw5 LIukuO5tEafANGVT5n9aOJOVnp52e/6zDTArEnJGUpLIRJXAtgEbaEWSmyCE4upveWtz 9J8Ms/5HOAX8MsSSEsn9YUoKuSjTZDbot8clrcYewHryC2e2s1/BUfsEVzDexVHjYA4O rU+Pesj4FHb7eKHrOPjpWaVNR/vnytXcJ/97E25p1qPX95OJks4wN+sZEtsWnuNshgGz s93LrtxMDUBspxoy3vlKx9lQ9RxzwPbwBaGaSeNWX0rnlTE1jlG9qPrU1NgKPlu62hnh roBA== X-Gm-Message-State: AElRT7GwJoWVrLShy37LOxIHm2lPyMEaJOBVmnRSgfsmYzmTDLpbpZum km5pyxpyIs1nzHxPoKxhrNyZ/hvkA97jps5FJzc= X-Google-Smtp-Source: AG47ELspPXanV87k1iV4SE3PYP2GFQ+eWbfaVQFRvKXvyYx/+JR7Zq9e8b52WqE0U9rdOvOYNrrBl4T8qFY8TBIUR+E= X-Received: by 10.107.27.132 with SMTP id b126mr6372578iob.195.1521129439046; Thu, 15 Mar 2018 08:57:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.30.221 with HTTP; Thu, 15 Mar 2018 08:57:18 -0700 (PDT) In-Reply-To: <20180315155442.GT8577@tucnak> References: <20180313040809.GA69151@troutmask.apl.washington.edu> <20180314005722.GA43280@troutmask.apl.washington.edu> <20180315141026.GA57660@troutmask.apl.washington.edu> <20180315150810.GS8577@tucnak> <20180315155442.GT8577@tucnak> From: "Bin.Cheng" Date: Thu, 15 Mar 2018 15:57:00 -0000 Message-ID: Subject: Re: [PATCH] Fortran -- clean up KILL To: Jakub Jelinek Cc: Steve Kargl , Richard Biener , Janne Blomqvist , Fortran List , GCC Patches Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-03/txt/msg00064.txt.bz2 On Thu, Mar 15, 2018 at 3:54 PM, Jakub Jelinek wrote: > 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: Ah, Thanks. I haven't checked generated code when it builds. Thanks, bin > 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