From patchwork Tue Feb 25 00:40:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Kargl X-Patchwork-Id: 1243767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-520045-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=troutmask.apl.washington.edu Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=nXZC/9B9; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RKpy5DYpz9sP7 for ; Tue, 25 Feb 2020 11:40:40 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=YjSC+Pf0GBoXm5X29z1XlxBThPrDGT0KpPyB9nVXV7S 9IIVOdILSwLnScH6HIxVuG3JK3MyFBOzjK3hDoEOw/XokJJLR+NZBSU98Af9/M9Y Ot+S1HCIWzGNxcEDKb5bcgANuHkQmFhnPHoK2j1G1J5OVek63ZtKg+n9wex6SMXI = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=+G6oS/dmV0Uerk88wJy456BBCSo=; b=nXZC/9B9w/nF9jNVw OUaLPrkGP65qfEhq6jkoDKLICUEjeBMPNeotUkA+retTTlfctVTf2R2tXIFZ4ypN 3qEKltQ8Ie17IMQb8ZhEdXp27tZMwpfZstxm4m1iYgfL0QLuYDSEmQvSnwohdAEp MZ9MLsZGcvSB8qGqLuc3MZ02B0= Received: (qmail 93742 invoked by alias); 25 Feb 2020 00:40:28 -0000 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 Received: (qmail 93727 invoked by uid 89); 25 Feb 2020 00:40:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Feb 2020 00:40:26 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id 01P0ePYP076984 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 24 Feb 2020 16:40:25 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id 01P0eOh3076983; Mon, 24 Feb 2020 16:40:24 -0800 (PST) (envelope-from sgk) Date: Mon, 24 Feb 2020 16:40:24 -0800 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Dead code in fortran/simplify.c Message-ID: <20200225004024.GA76976@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu MIME-Version: 1.0 Content-Disposition: inline Dead code is probably not the right description. Something like 'result that is not used' is better. In event, the patch removes 3 useless lines. Please commit. Index: gcc/fortran/simplify.c =================================================================== --- gcc/fortran/simplify.c (revision 280157) +++ gcc/fortran/simplify.c (working copy) @@ -1774,11 +1792,6 @@ degrees_f (mpfr_t x, mpfr_rnd_t rnd_mode) { mpfr_t tmp; mpfr_init (tmp); - - /* Set x = x % 2pi to avoid offsets with large angles. */ - mpfr_const_pi (tmp, rnd_mode); - mpfr_mul_ui (tmp, tmp, 2, rnd_mode); - mpfr_fmod (tmp, x, tmp, rnd_mode); /* Set x = x * 180. */ mpfr_mul_ui (x, x, 180, rnd_mode);