From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id F37EB3890430 for ; Wed, 10 Mar 2021 11:34:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F37EB3890430 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=botcazou@adacore.com Received: by mail-wm1-x336.google.com with SMTP id u187so6875097wmg.4 for ; Wed, 10 Mar 2021 03:34:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vOd6tQ+25kp/l2+h3703x5tVGWEmmGtUItNVq/APyHE=; b=tMqi60XF0SRMTJpqvLZgK8lf/9lZ65/q1lMa+VyCR766se5iHH0KVh78o0QDPI3kTL UE9PHpSuOI82dSxVqICf+WiTiUTSCSh2UOL+rV1xJXrsFwq/GWrx1US/fUzapv8SDrjg Wsxg3TQouMqo0kbt4o0QzyU8eI8N5bYNW7/dseCCUNAxoNcR+TdIfsfL93pM6hjX0NdR Lg7aw5guZYaueBgdgJjUYMYvOMHO7vaq5Pcd2XWNOroxP1VndjYjdPTODbxBc5f9lxdZ Cl8z7AWbcWvmKIjpuUjlFcRFTrRMFY+ka9A4zUw1B6bXYpaViwNaOY5AM9ls5vnQaNyH m0RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vOd6tQ+25kp/l2+h3703x5tVGWEmmGtUItNVq/APyHE=; b=udtN+dxoRDqn9SELaHoZ7iP3vPSJZ/2gXoyKWdhdD0mtdzHPaMTdplHMi6iiC2YwNG CeV3lkxJtPF902ztXfenbsdr+8V1iGcS+sncAr2nZEAMxYCNpWwEwBqBzXN9qxLQ04TH CGK9u23NNis7D6zqRit+KY9ACfYCrjXCtFhohI23uZq7dfjCRov7ScLA+FIkSEis/mhR yzXtxuduO3Z80r/39+AQrznlUQGmMdkb906LuN7wkj/tw+zIIDjy2PdHn9s0E5nCntQV o7EPxY0lm0oCz55/7hTK5UHvLcHFnc6lTaRVbuZIPjNy8JHjQ2ZcsCYvgEo+RZ13zGTx lXfw== X-Gm-Message-State: AOAM5303l0l4FZNSmhXUb1VPHN4nZQDvF3u3aW3SiaYKkmKdEuyn5Xee 6ySlVQ3LzxSTRzTrAS16tdhM9Q== X-Google-Smtp-Source: ABdhPJxI4xCbFx8u7WKIGmQMvhsGFz33XntAweiAK9EMLIFsaeU/Dy+Pgf2fuBXjdcgOaFG42vFoBA== X-Received: by 2002:a05:600c:2946:: with SMTP id n6mr2911411wmd.52.1615376083587; Wed, 10 Mar 2021 03:34:43 -0800 (PST) Received: from fomalhaut.localnet ([2a01:e0a:41b:84f0:cf71:f5e0:b050:bede]) by smtp.gmail.com with ESMTPSA id d204sm9218178wmc.17.2021.03.10.03.34.43 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Mar 2021 03:34:43 -0800 (PST) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: Tobias Burnus Cc: gcc-patches@gcc.gnu.org, fortran Subject: Re: [patch] Fix PR fortran/96983 Date: Wed, 10 Mar 2021 12:34:42 +0100 Message-ID: <1978065.on9YKFqRqg@fomalhaut> In-Reply-To: <3ffe91c1-4da4-ecd9-1d16-c0135af1c3e9@mentor.com> References: <5050796.fM2REodTD2@fomalhaut> <3ffe91c1-4da4-ecd9-1d16-c0135af1c3e9@mentor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 11:34:46 -0000 > I think it is a bad idea to hard-code the real type. > Does the following work for you? If so, I think that > patch is obvious and you can go ahead and commit it. > > --- a/gcc/fortran/trans-intrinsic.c > +++ b/gcc/fortran/trans-intrinsic.c > @@ -407,7 +407,7 @@ build_round_expr (tree arg, tree restype) > if (kind < 0) > gfc_internal_error ("Could not find real kind with at least %d > bits", resprec); > - arg = fold_convert (gfc_float128_type_node, arg); > + arg = fold_convert (gfc_get_real_type (kind), arg); > fn = gfc_builtin_decl_for_float_kind (BUILT_IN_ROUND, kind); > } > else Yes, it works fine on x86-64/Linux and SPARC64/Linux, applied, thanks. -- Eric Botcazou