From nobody Sun Apr 09 14:42:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PvZZf3LXQz44Y3J; Sun, 9 Apr 2023 14:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PvZZf1PJXz4R8d; Sun, 9 Apr 2023 14:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681051354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0mLWCmaOX7oxjAD1ACCb9bck9ImHuUGXvKQKdnWgT7k=; b=GaxvcsjelwjKjUwkgU85tA5Gvw8+9R5ynUqPNh6yWd+3WvQ6dbKveXqiZ/V4NPtpo/mdml gnzGaVD+G52coEZ3EgY0UHpDqFpgZNlxwjq6a5/mhLmwHCM19j07BNigzeo5RNRKqdS4B7 oF2LkShOhm5N05SNEhmZfVvJnZ6JvcMfrBqwAWUFWw0WeGUJ7KZgD459p8Y8XXzHF9J+X4 igxGZfZ927V+CxkfMaiIcvikOKIpKTVEQsPKN7FYq5CXbnaEdh4mnci4IgmuoD+QuyBG1y YSJyFa2lA1KKblebdFh1jFfcPHjseN0jTGRx+F5tCTdRtopKyFYzoMybv2hryA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681051354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0mLWCmaOX7oxjAD1ACCb9bck9ImHuUGXvKQKdnWgT7k=; b=Hh33G0oFBF+oAw7Vnwo/S3n1BK4RnDu9XVNR00u1x4fShd/4q7svsZilD++ZB+uFsOWc5Y gHcOH9SNyVdqydkY2VhizEsPM+IhQcnmFkd4eP+l4ZYKULP1+Cj5jJUU8AfKsVsyKq1f3z uUXso16Iq7XA43QyLAopndPFvcP1SX7TvwPNebPxBr3yzsFEV7n3Jcz2iHmhbrHAtP99cm o7/WNepc9ghhtXxtNNZjKMkG+o0uXROSAlLZaOBiReR9B4CcssBZua5TlwO6Xb9PuXNo3x Zk9jJOw7b0rU35T1SZ+qylOacm0RkJ9VW627fFPu3Kvy3VGXSdITA2UIMOBjUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681051354; a=rsa-sha256; cv=none; b=XRX0Hn5BmcE6acPqL5kH4nG9o+RLu/yt6fNnxnQAvSPPA21nDM2LOHCvjF9pAtMOPDyaUD rbN+ya7noL+zcEVN6ARNQrShsKFY1eX1Fxv+zqCULzQkcYhSFwCmM9+YSaP5fLD8I3jCYX 8Y8x27KIrVWrIC/6zdXnTAHOoK1RdHVIwfc50Hsg6GmmT3lJFf1Y8R91bbk0H2tMcKmOvh 7uhiSp/1ihjVfeHMW9HMo7izSVNgzNvsJBTqPbLt7/InPkrJv7JaLnwScYZn3A5tuHk7f3 QvHHfDDhyFXc+p2chjPP9TZ79VGAgO9NUyzamxtH2rUTFvzg1wj120A8djz9zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PvZZf0VkPz1BlL; Sun, 9 Apr 2023 14:42:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 339EgX8B001618; Sun, 9 Apr 2023 14:42:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 339EgX9n001617; Sun, 9 Apr 2023 14:42:33 GMT (envelope-from git) Date: Sun, 9 Apr 2023 14:42:33 GMT Message-Id: <202304091442.339EgX9n001617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3e7b96764a80 - stable/13 - : Avoid instantiating a pointer type in std::decay<>. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e7b96764a80c7851421af60f800587b2f94b697 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3e7b96764a80c7851421af60f800587b2f94b697 commit 3e7b96764a80c7851421af60f800587b2f94b697 Author: John Baldwin AuthorDate: 2022-11-24 00:10:05 +0000 Commit: Dimitry Andric CommitDate: 2023-04-09 14:39:46 +0000 : Avoid instantiating a pointer type in std::decay<>. GCC expands the pointer type in this conditional expression even for template types _Up that are not arrays. This raises an error when std::decay<> is used with reference types (as is done in LLVM's sources). Using add_pointer<> causes GCC to only instantiate a pointer type for array types. A similar change to this commit (albeit reworked due to upstream changes) has been merged to libc++ in commit 26068c6e60324ed866a1ca2afb5cb5eb0aaf015b. In file included from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/ordering.h:13, from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__compare/common_comparison_category.h:12, from /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/tuple:168, from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:20, from /usr/src/contrib/llvm-project/llvm/include/llvm/ADT/DenseMap.h:17, from /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:36: /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits: In instantiation of 'struct std::__1::__decay': /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1591:89: required from 'struct std::__1::decay' /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/__utility/pair.h:132:16: required by substitution of 'template::type>::value && (! std::__1::is_same::type, std::__1::pair > >::value)), std::__1::pair >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* > constexpr std::__1::pair >::pair(_Tuple&&) [with _Tuple = llvm::CHIArg&&; typename std::__1::enable_if::type>::value && (! std::__1::is_same::type, std::__1::pair > >::value)), std::__1::pair >::_CheckTupleLikeConstructor, std::__1::__check_tuple_constructor_fail>::type::__enable_implicit<_Tuple>(), void>::type* = ]' /usr/src/contrib/llvm-project/llvm/lib/Transforms/Scalar/GVNHoist.cpp:892:51: required from here /usr/obj/usr/src/amd64.amd64/tmp/usr/include/c++/v1/type_traits:1582:30: error: forming pointer to reference type 'std::__1::remove_extent::type' {aka 'llvm::CHIArg&'} 1582 | >::type type; | ^~~~ Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D36898 (cherry picked from commit c36de97088a2b9141cdaf2fae2a7f41bf820ffa0) --- contrib/llvm-project/libcxx/include/type_traits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/type_traits b/contrib/llvm-project/libcxx/include/type_traits index 3391999675a0..daf031e475f7 100644 --- a/contrib/llvm-project/libcxx/include/type_traits +++ b/contrib/llvm-project/libcxx/include/type_traits @@ -1572,7 +1572,7 @@ public: typedef _LIBCPP_NODEBUG typename conditional < is_array<_Up>::value, - typename remove_extent<_Up>::type*, + typename add_pointer::type>::type, typename conditional < is_function<_Up>::value,