From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1285) id 7B01338708CB; Wed, 10 Mar 2021 11:32:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B01338708CB MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Eric Botcazou To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-7595] Do not assume that __float128 exists X-Act-Checkin: gcc X-Git-Author: Eric Botcazou X-Git-Refname: refs/heads/master X-Git-Oldrev: 1c3c12b0a6fdffce0eca0b21518cbb53b20abff1 X-Git-Newrev: 47403a0eefac52636db768dc46c3c88a2cd4b28e Message-Id: <20210310113222.7B01338708CB@sourceware.org> Date: Wed, 10 Mar 2021 11:32:22 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2021 11:32:22 -0000 https://gcc.gnu.org/g:47403a0eefac52636db768dc46c3c88a2cd4b28e commit r11-7595-g47403a0eefac52636db768dc46c3c88a2cd4b28e Author: Eric Botcazou Date: Wed Mar 10 12:05:53 2021 +0100 Do not assume that __float128 exists The code in build_round_expr implicitly assumes that __float128 exists, which is *not* the common case among 64-bit architectures since the "long double" type is generally already 128-bit for them. gcc/fortran/ PR fortran/96983 * trans-intrinsic.c (build_round_expr): Do not implicitly assume that __float128 is the 128-bit floating-point type. Diff: --- gcc/fortran/trans-intrinsic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 5c9258c65c3..9cf3642f694 100644 --- 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