From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 1B43C382E902; Wed, 29 Jun 2022 14:54:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B43C382E902 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,231,1650960000"; d="scan'208";a="78037806" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 29 Jun 2022 06:54:19 -0800 IronPort-SDR: nTWwITcEo82K6tWw8bYMP2eChaBkQtT36gUPZyncYMb4RBkGJVk1fo3pKkJiFVyATL1NNXdHcu gOqG1v3WzEmJCf8+OikK3fNHJawM2YYyRMgAQlE0iTEV9WEXGw4Ih4JHg5jwjPUbFcSYPVD27H bNiLXVT1gOwfAvIt9dL92zNhlsXE5hbjJfvfl+wKRXRUhKDs+uyQoAFh7L79nMgnVh/r2OQFxR UNgANwA3z6VrY/T6YED0ebRfe+EeJUF8YhOZplURcfQodWB+sBvVmz3TFh/bWmmI7I9yx4Xi8e P4s= Message-ID: <4cbd2e55-ce45-55a8-778c-6b0738d54d10@codesourcery.com> Date: Wed, 29 Jun 2022 16:54:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] libgfortran: Switch some more __float128 uses to _Float128 Content-Language: en-US To: Jakub Jelinek , , References: From: Tobias Burnus In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 29 Jun 2022 14:54:23 -0000 On 29.06.22 14:15, Jakub Jelinek via Fortran wrote: > My patch apparently left some __float128 uses in libgfortran > that could use _Float128 instead, the following patch changes that. > > Ok for trunk? LGTM. Thanks! Tobias > 2022-06-29 Jakub Jelinek > > * mk-kinds-h.sh: Change __float128 to _Float128 in a comment. > * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Adjust comment. > (LIBGFOR_CHECK_MATH_IEEE128): Use _Float128 instead of __float128. > * libgfortran.h (isnan): Change __float128 to _Float128 in a commen= t. > (__acoshieee128, __acosieee128, __asinhieee128, __asinieee128, > __atan2ieee128, __atanhieee128, __atanieee128, __copysignieee128, > __coshieee128, __cosieee128, __erfcieee128, __erfieee128, > __expieee128, __fabsieee128, __fmaieee128, __fmodieee128, __jnieee1= 28, > __log10ieee128, __logieee128, __powieee128, __sinhieee128, > __sinieee128, __sqrtieee128, __tanhieee128, __tanieee128, > __ynieee128, __strtoieee128): Use _Float128 instead of __float128. > * configure: Regenerated. > > --- libgfortran/mk-kinds-h.sh.jj 2022-06-28 13:14:45.334799175 +0200 > +++ libgfortran/mk-kinds-h.sh 2022-06-29 14:01:32.935361103 +0200 > @@ -67,7 +67,7 @@ for k in $possible_real_kinds; do > 8) ctype=3D"double" ; cplxtype=3D"complex double" ; suffix=3D"" ;= ; > # If we have a REAL(KIND=3D10), it is always long double > 10) ctype=3D"long double" ; cplxtype=3D"complex long double" ; su= ffix=3D"l" ;; > - # If we have a REAL(KIND=3D16), it is either long double or __floa= t128 > + # If we have a REAL(KIND=3D16), it is either long double or _Float= 128 > 16) if [ $long_double_kind -ne 16 ]; then > ctype=3D"_Float128" > cplxtype=3D"_Complex _Float128" > --- libgfortran/acinclude.m4.jj 2022-06-29 11:45:19.286551469 +0200 > +++ libgfortran/acinclude.m4 2022-06-29 14:00:22.964279364 +0200 > @@ -261,7 +261,7 @@ __mingw_snprintf (NULL, 0, "%d\n", 1); > fi > ]) > > -dnl Check whether we have a __float128 type > +dnl Check whether we have a __float128 and _Float128 type > AC_DEFUN([LIBGFOR_CHECK_FLOAT128], [ > LIBQUADSPEC=3D > LIBQUADLIB=3D > @@ -537,8 +537,8 @@ AC_DEFUN([LIBGFOR_CHECK_MATH_IEEE128], > AC_REQUIRE([GCC_CHECK_MATH_HEADERS]) > AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1], > [AC_LINK_IFELSE([AC_LANG_SOURCE([ > -__float128 $1 (__float128); > -__float128 (*ptr)(__float128) =3D $1; > +_Float128 $1 (_Float128); > +_Float128 (*ptr)(_Float128) =3D $1; > > int > main () > --- libgfortran/libgfortran.h.jj 2022-06-28 13:14:45.333799188 +0200 > +++ libgfortran/libgfortran.h 2022-06-29 14:01:14.364604813 +0200 > @@ -247,7 +247,7 @@ extern int __mingw_snprintf (char *, siz > > Another advantage for GCC's builtins for these type-generic macros > is that it handles floating-point types that the system headers > - may not support (like __float128). */ > + may not support (like _Float128). */ > > #undef isnan > #define isnan(x) __builtin_isnan(x) > @@ -1960,59 +1960,59 @@ internal_proto(cshift1_16_c17); > > /* Prototypes for the POWER __ieee128 functions. */ > #ifdef POWER_IEEE128 > -extern __float128 __acoshieee128 (__float128) > +extern _Float128 __acoshieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __acosieee128 (__float128) > +extern _Float128 __acosieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __asinhieee128 (__float128) > +extern _Float128 __asinhieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __asinieee128 (__float128) > +extern _Float128 __asinieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __atan2ieee128 (__float128) > +extern _Float128 __atan2ieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __atanhieee128 (__float128) > +extern _Float128 __atanhieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __atanieee128 (__float128) > +extern _Float128 __atanieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __copysignieee128 (__float128, __float128) > +extern _Float128 __copysignieee128 (_Float128, _Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __coshieee128 (__float128) > +extern _Float128 __coshieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __cosieee128 (__float128) > +extern _Float128 __cosieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __erfcieee128 (__float128) > +extern _Float128 __erfcieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __erfieee128 (__float128) > +extern _Float128 __erfieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __expieee128 (__float128) > +extern _Float128 __expieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __fabsieee128 (__float128) > +extern _Float128 __fabsieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __fmaieee128 (__float128, __float128, __float128) > +extern _Float128 __fmaieee128 (_Float128, _Float128, _Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __fmodieee128 (__float128, __float128) > +extern _Float128 __fmodieee128 (_Float128, _Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __jnieee128 (int, __float128) > +extern _Float128 __jnieee128 (int, _Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __log10ieee128 (__float128) > +extern _Float128 __log10ieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __logieee128 (__float128) > +extern _Float128 __logieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __powieee128 (__float128) > +extern _Float128 __powieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __sinhieee128 (__float128) > +extern _Float128 __sinhieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __sinieee128 (__float128) > +extern _Float128 __sinieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __sqrtieee128 (__float128) > +extern _Float128 __sqrtieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __tanhieee128 (__float128) > +extern _Float128 __tanhieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __tanieee128 (__float128) > +extern _Float128 __tanieee128 (_Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __ynieee128 (int , __float128) > +extern _Float128 __ynieee128 (int , _Float128) > __attribute__ ((__nothrow__, __leaf__)); > -extern __float128 __strtoieee128 (const char *, char **) > +extern _Float128 __strtoieee128 (const char *, char **) > __attribute__ ((__nothrow__, __leaf__)); > extern int __snprintfieee128 (char *, size_t, const char *, ...) > __attribute__ ((__nothrow__)); > --- libgfortran/configure.jj 2022-06-29 11:45:49.951148846 +0200 > +++ libgfortran/configure 2022-06-29 14:01:58.718022745 +0200 > @@ -25862,8 +25862,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __acoshieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __acoshieee128; > +_Float128 __acoshieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __acoshieee128; > > int > main () > @@ -25904,8 +25904,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __acosieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __acosieee128; > +_Float128 __acosieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __acosieee128; > > int > main () > @@ -25946,8 +25946,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __asinhieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __asinhieee128; > +_Float128 __asinhieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __asinhieee128; > > int > main () > @@ -25988,8 +25988,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __asinieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __asinieee128; > +_Float128 __asinieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __asinieee128; > > int > main () > @@ -26030,8 +26030,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __atan2ieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __atan2ieee128; > +_Float128 __atan2ieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __atan2ieee128; > > int > main () > @@ -26072,8 +26072,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __atanhieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __atanhieee128; > +_Float128 __atanhieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __atanhieee128; > > int > main () > @@ -26114,8 +26114,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __atanieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __atanieee128; > +_Float128 __atanieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __atanieee128; > > int > main () > @@ -26156,8 +26156,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __coshieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __coshieee128; > +_Float128 __coshieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __coshieee128; > > int > main () > @@ -26198,8 +26198,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __cosieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __cosieee128; > +_Float128 __cosieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __cosieee128; > > int > main () > @@ -26240,8 +26240,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __erfieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __erfieee128; > +_Float128 __erfieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __erfieee128; > > int > main () > @@ -26282,8 +26282,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __expieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __expieee128; > +_Float128 __expieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __expieee128; > > int > main () > @@ -26324,8 +26324,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __fabsieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __fabsieee128; > +_Float128 __fabsieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __fabsieee128; > > int > main () > @@ -26366,8 +26366,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __jnieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __jnieee128; > +_Float128 __jnieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __jnieee128; > > int > main () > @@ -26408,8 +26408,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __log10ieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __log10ieee128; > +_Float128 __log10ieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __log10ieee128; > > int > main () > @@ -26450,8 +26450,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __logieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __logieee128; > +_Float128 __logieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __logieee128; > > int > main () > @@ -26492,8 +26492,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __powieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __powieee128; > +_Float128 __powieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __powieee128; > > int > main () > @@ -26534,8 +26534,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __sinhieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __sinhieee128; > +_Float128 __sinhieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __sinhieee128; > > int > main () > @@ -26576,8 +26576,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __sinieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __sinieee128; > +_Float128 __sinieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __sinieee128; > > int > main () > @@ -26618,8 +26618,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __sqrtieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __sqrtieee128; > +_Float128 __sqrtieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __sqrtieee128; > > int > main () > @@ -26660,8 +26660,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __tanhieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __tanhieee128; > +_Float128 __tanhieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __tanhieee128; > > int > main () > @@ -26702,8 +26702,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __tanieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __tanieee128; > +_Float128 __tanieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __tanieee128; > > int > main () > @@ -26744,8 +26744,8 @@ fi > cat confdefs.h - <<_ACEOF >conftest.$ac_ext > /* end confdefs.h. */ > > -__float128 __ynieee128 (__float128); > -__float128 (*ptr)(__float128) =3D __ynieee128; > +_Float128 __ynieee128 (_Float128); > +_Float128 (*ptr)(_Float128) =3D __ynieee128; > > int > main () > > Jakub > ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955