From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C9C3F384E22E for ; Thu, 15 Dec 2022 14:56:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C9C3F384E22E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671116176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e+S8vjb33tax383V68TCKkvV5JzGH9QYGvp2UE+wVqo=; b=bjxlngPeMS4a0eQSO3tN7QW3m9wJ9VV43dj1/oXJovelcZENraNage1S1AddxpTBvcAaHG eGTck0P6wrP8dGMOr4BRIZ/76iiMesy9FskPwvzvDLglu/82cTsLXRkmmw1iKG4ZBi3B9T vkVyxDtBYyf8NF3CXjhr+qzBt+rFF8o= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-118-wbSLtB7dMAGbqneQaeZMYQ-1; Thu, 15 Dec 2022 09:56:15 -0500 X-MC-Unique: wbSLtB7dMAGbqneQaeZMYQ-1 Received: by mail-ua1-f69.google.com with SMTP id z42-20020ab0492d000000b00423b333ff7dso1403770uac.22 for ; Thu, 15 Dec 2022 06:56:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e+S8vjb33tax383V68TCKkvV5JzGH9QYGvp2UE+wVqo=; b=SOcHZYJqkAd01W9OardVMw8KgicG2c/b7ni2ad8yUnh0qjTT+WN4zJv/k4QvnYRWqF qo19sxIQOiQqIoW0Uizktc2krohZDWzCToVv02fJ8b7Icc+6pNpXCFHnyP5gt9GCkP/h NCb5T6jpSNKFUYIY0ThFRbTSKpvIEiJnJ68EXL5D0V1mRVKjT5Rj/tfGdaZTyFKH4PxF TrYWGKJtZ1c4B3LiipVuKOWAsemFZRa0liyVYaR3O6vIlK0YkgcbtIiZ4SPbO6ycJ03y IErlWmZBaXUVdG0leQYnBTU1OvC6Djf6HxTObLYpz2PpRNHSWD0z70CqoFsNnN3EWrZ2 M/3w== X-Gm-Message-State: ANoB5pmHDhGazVuLNrgtLeC1W24591xMJEq4DIu7VPbGpbykWW4Zf2Lt 3CMQiO/0HEKLemamtF2Ha2c0hIeGkT++peys/ZMJsGliJGxbBGI8dvs/9kyjCm7IYlnaHrOG1kv sG7Sn34EC3kQXsAM= X-Received: by 2002:a05:6102:34c9:b0:3b1:2a75:fd9d with SMTP id a9-20020a05610234c900b003b12a75fd9dmr15236427vst.9.1671116174513; Thu, 15 Dec 2022 06:56:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dqIAzJLZ16BpuFIVZEHsVuL/HXucxjYXxmThTMLwmoAQ1etwSRT+Ds13VmweIUvQeqjsHQA== X-Received: by 2002:a05:6102:34c9:b0:3b1:2a75:fd9d with SMTP id a9-20020a05610234c900b003b12a75fd9dmr15236339vst.9.1671116173444; Thu, 15 Dec 2022 06:56:13 -0800 (PST) Received: from [192.168.1.108] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id h19-20020a05620a245300b006cebda00630sm12358432qkn.60.2022.12.15.06.56.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Dec 2022 06:56:12 -0800 (PST) Message-ID: Date: Thu, 15 Dec 2022 09:56:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH] c++, libstdc++: Add typeinfo for _Float{16,32,64,128,32x,64x} and __bf16 types [PR108075] To: Jakub Jelinek , Jonathan Wakely Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org References: From: Jason Merrill In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 12/13/22 04:40, Jakub Jelinek wrote: > Hi! > > The following patch adds typeinfos for the extended floating point > types and _Float{32,64}x. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK. > 2022-12-13 Jakub Jelinek > > PR libstdc++/108075 > gcc/cp/ > * rtti.cc (emit_support_tinfos): Add pointers to > {bfloat16,float{16,32,64,128,32x,64x,128x}}_type_node to fundamentals > array. > gcc/testsuite/ > * g++.dg/cpp23/ext-floating13.C: New test. > libstdc++-v3/ > * config/abi/pre/gnu.ver (CXXABI_1.3.14): Export > _ZTIDF[0-9]*[_bx], _ZTIPDF[0-9]*[_bx] and _ZTIPKDF[0-9]*[_bx]. > * testsuite/util/testsuite_abi.cc (check_version): Handle > CXXABI_1.3.14. > > --- gcc/cp/rtti.cc.jj 2022-10-17 12:29:33.519016406 +0200 > +++ gcc/cp/rtti.cc 2022-12-12 15:23:48.244190755 +0100 > @@ -1603,7 +1603,9 @@ emit_support_tinfos (void) > &long_long_integer_type_node, &long_long_unsigned_type_node, > &float_type_node, &double_type_node, &long_double_type_node, > &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node, > - &nullptr_type_node, > + &bfloat16_type_node, &float16_type_node, &float32_type_node, > + &float64_type_node, &float128_type_node, &float32x_type_node, > + &float64x_type_node, &float128x_type_node, &nullptr_type_node, > 0 > }; > int ix; > --- gcc/testsuite/g++.dg/cpp23/ext-floating13.C.jj 2022-12-12 15:38:51.357009408 +0100 > +++ gcc/testsuite/g++.dg/cpp23/ext-floating13.C 2022-12-12 15:39:04.568816597 +0100 > @@ -0,0 +1,35 @@ > +// P1467R9 - Extended floating-point types and standard names. > +// { dg-do link { target c++23 } } > +// { dg-options "" } > + > +#include > + > +#ifdef __STDCPP_FLOAT16_T__ > +const std::type_info &a = typeid(decltype(0.0f16)); > +#endif > +#ifdef __STDCPP_BFLOAT16_T__ > +const std::type_info &b = typeid(decltype(0.0bf16)); > +#endif > +#ifdef __STDCPP_FLOAT32_T__ > +const std::type_info &c = typeid(decltype(0.0f32)); > +#endif > +#ifdef __STDCPP_FLOAT64_T__ > +const std::type_info &d = typeid(decltype(0.0f64)); > +#endif > +#ifdef __STDCPP_FLOAT128_T__ > +const std::type_info &e = typeid(decltype(0.0f128)); > +#endif > +#ifdef __FLT32X_MAX__ > +const std::type_info &f = typeid(decltype(0.0f32x)); > +#endif > +#ifdef __FLT64X_MAX__ > +const std::type_info &g = typeid(decltype(0.0f64x)); > +#endif > +#ifdef __FLT128X_MAX__ > +const std::type_info &h = typeid(decltype(0.0f128x)); > +#endif > + > +int > +main () > +{ > +} > --- libstdc++-v3/config/abi/pre/gnu.ver.jj 2022-11-11 08:15:45.646183974 +0100 > +++ libstdc++-v3/config/abi/pre/gnu.ver 2022-12-12 15:34:08.178142084 +0100 > @@ -2794,6 +2794,16 @@ CXXABI_1.3.13 { > > } CXXABI_1.3.12; > > +CXXABI_1.3.14 { > + > + # typeinfo for _Float{16,32,64,128,32x,64x,128x} and > + # __bf16 > + _ZTIDF[0-9]*[_bx]; > + _ZTIPDF[0-9]*[_bx]; > + _ZTIPKDF[0-9]*[_bx]; > + > +} CXXABI_1.3.13; > + > # Symbols in the support library (libsupc++) supporting transactional memory. > CXXABI_TM_1 { > > --- libstdc++-v3/testsuite/util/testsuite_abi.cc.jj 2022-09-12 11:30:14.224870022 +0200 > +++ libstdc++-v3/testsuite/util/testsuite_abi.cc 2022-12-12 15:46:41.036156477 +0100 > @@ -230,6 +230,7 @@ check_version(symbol& test, bool added) > known_versions.push_back("CXXABI_1.3.11"); > known_versions.push_back("CXXABI_1.3.12"); > known_versions.push_back("CXXABI_1.3.13"); > + known_versions.push_back("CXXABI_1.3.14"); > known_versions.push_back("CXXABI_IEEE128_1.3.13"); > known_versions.push_back("CXXABI_TM_1"); > known_versions.push_back("CXXABI_FLOAT128"); > @@ -251,7 +252,7 @@ check_version(symbol& test, bool added) > bool latestp = (test.version_name == "GLIBCXX_3.4.31" > // XXX remove next line when baselines have been regenerated. > || test.version_name == "GLIBCXX_IEEE128_3.4.30" > - || test.version_name == "CXXABI_1.3.13" > + || test.version_name == "CXXABI_1.3.14" > || test.version_name == "CXXABI_FLOAT128" > || test.version_name == "CXXABI_TM_1"); > if (added && !latestp) > > Jakub >