From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 7B7C838582BC; Wed, 11 Jan 2023 09:25:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B7C838582BC 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.96,315,1665475200"; d="scan'208";a="96556098" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 11 Jan 2023 01:25:01 -0800 IronPort-SDR: HFoYrghLOEk4gs1VvoIek16uDqWvNeWpvwCVYt+oZyAnbmxoN9HPmO7TqDI2rmQ6vyulhynb0l VNaROJDOEtb9Grp6f7y15Tnh7/WnXQzcnLXVOcjWb/3J+yPzgbPqrJ/Ehr7s/NIAdIdacjsiQj ZAV3IYBZtwNrAD1GSs3tRdWcuDYUNZmY1kEPj0oOLj0Ugw92akbx6QHxFcTEpi8xOVoDzS/cgI M3aSu8aa42ayv+Jh2sJs4HBCmNBJSVwrWtv5TVFJulKDNZANS5KLIvVaDNoO4p03usBPhRqH+5 ymk= Message-ID: Date: Wed, 11 Jan 2023 10:24:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] fortran: Fix up function types for realloc and sincos{,f,l} builtins [PR108349] To: Jakub Jelinek , , References: Content-Language: en-US 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.4 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On 11.01.23 10:18, Jakub Jelinek via Gcc-patches wrote: > As reported in the PR, the FUNCTION_TYPE for __builtin_realloc in the > Fortran FE is wrong since r0-100026-gb64fca63690ad [...] > I went through all other changes from that commit and found that > __builtin_sincos{,f,l} got broken as well, [...] > > The following patch fixes that, plus some formatting issues around > the spots I've changed. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. Thanks for the patch! Tobias > 2023-01-11 Jakub Jelinek > > PR fortran/108349 > * f95-lang.cc (gfc_init_builtin_function): Fix up function types > for BUILT_IN_REALLOC and BUILT_IN_SINCOS{F,,L}. Formatting fixes. > > --- gcc/fortran/f95-lang.cc.jj 2022-11-15 22:57:18.247210671 +0100 > +++ gcc/fortran/f95-lang.cc 2023-01-10 11:31:43.787266346 +0100 > @@ -714,31 +714,34 @@ gfc_init_builtin_functions (void) > float_type_node, NULL_T= REE); > > func_cdouble_double =3D build_function_type_list (double_type_node, > - complex_double_type_no= de, > - NULL_TREE); > + complex_double_type_node, > + NULL_TREE); > > func_double_cdouble =3D build_function_type_list (complex_double_type= _node, > - double_type_node, NULL= _TREE); > + double_type_node, NULL_TR= EE); > > - func_clongdouble_longdouble =3D > - build_function_type_list (long_double_type_node, > - complex_long_double_type_node, NULL_TREE); > - > - func_longdouble_clongdouble =3D > - build_function_type_list (complex_long_double_type_node, > - long_double_type_node, NULL_TREE); > + func_clongdouble_longdouble > + =3D build_function_type_list (long_double_type_node, > + complex_long_double_type_node, NULL_TREE); > + > + func_longdouble_clongdouble > + =3D build_function_type_list (complex_long_double_type_node, > + long_double_type_node, NULL_TREE); > > ptype =3D build_pointer_type (float_type_node); > - func_float_floatp_floatp =3D > - build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); > + func_float_floatp_floatp > + =3D build_function_type_list (void_type_node, float_type_node, ptype= , ptype, > + NULL_TREE); > > ptype =3D build_pointer_type (double_type_node); > - func_double_doublep_doublep =3D > - build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); > + func_double_doublep_doublep > + =3D build_function_type_list (void_type_node, double_type_node, ptyp= e, > + ptype, NULL_TREE); > > ptype =3D build_pointer_type (long_double_type_node); > - func_longdouble_longdoublep_longdoublep =3D > - build_function_type_list (void_type_node, ptype, ptype, NULL_TREE); > + func_longdouble_longdoublep_longdoublep > + =3D build_function_type_list (void_type_node, long_double_type_node,= ptype, > + ptype, NULL_TREE); > > /* Non-math builtins are defined manually, so they're not included here= . */ > #define OTHER_BUILTIN(ID,NAME,TYPE,CONST) > @@ -992,9 +995,8 @@ gfc_init_builtin_functions (void) > "calloc", ATTR_NOTHROW_LEAF_MALLOC_LIST); > DECL_IS_MALLOC (builtin_decl_explicit (BUILT_IN_CALLOC)) =3D 1; > > - ftype =3D build_function_type_list (pvoid_type_node, > - size_type_node, pvoid_type_node, > - NULL_TREE); > + ftype =3D build_function_type_list (pvoid_type_node, pvoid_type_node, > + size_type_node, NULL_TREE); > gfc_define_builtin ("__builtin_realloc", ftype, BUILT_IN_REALLOC, > "realloc", ATTR_NOTHROW_LEAF_LIST); > > > 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