From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13640 invoked by alias); 26 Sep 2019 17:38:33 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 13614 invoked by uid 89); 26 Sep 2019 17:38:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=amonakovisprasru, amonakov@ispras.ru, HX-HELO:sk:mail-vk, sk:amonako X-HELO: mail-vk1-f176.google.com Received: from mail-vk1-f176.google.com (HELO mail-vk1-f176.google.com) (209.85.221.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Sep 2019 17:38:31 +0000 Received: by mail-vk1-f176.google.com with SMTP id p189so624594vkf.10 for ; Thu, 26 Sep 2019 10:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z7GUJwUMhxPeePufaMSaxM0WviGh3lyxoJnVLPK0BsA=; b=lX8tSN89n/b0/Gp8kNnfYHzRLhpza7MTBSwXjAtv9qtX+L7LgiWj2Kj3k+0VP6/NuE kOyl+mMLhJdyJaO5qqqkBbQ+j9eEKdPqRtOauADa7nvOfJHHzz+DVCjETLOppG3xzqqu jGjiQk8zA2zumOahyCJbfFuLdapSUEqtfrdazqkvNEwsnmt3UZC/cg07Uwli+LkrU8rP JSaMJ0+huZyclYlDapG3gFpla30vvQiziNub6tfSPe02sEdQjgkCPODKSQIHz7vFYklT BH2L3Saocz4z8GCh+Ck40VIz06IybMPR2tgWb7USu6/ejwoX8f7TsCSoOFAIvqYqC6Mw Qo1Q== MIME-Version: 1.0 References: In-Reply-To: From: Konstantin Shegunov Date: Thu, 26 Sep 2019 17:38:00 -0000 Message-ID: Subject: Re: Odd optimizer behavior with FP arithmetic To: Alexander Monakov Cc: gcc-help@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00096.txt.bz2 On Thu, Sep 26, 2019 at 8:11 PM Alexander Monakov wrote: > The 'add' function is inlined into main, and floating-point operations that > would compute result.c are eliminated as dead code because result.c is > never > used. > > (and because the compiler doesn't attempt to preserve floating-point > exceptions > that those eliminated instructions might raise) ... In this case inlining does not happen due to flags being different between > 'main' and 'add'. > > In the first case inlining also does not happen for the same reason. > Well, ain't I a dummy. Thanks a lot! Konstantin.