From nobody Sun Jul 23 18:27:15 2023
X-Original-To: dev-commits-src-branches@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 4R8BbS2GFDz4p6L0;
	Sun, 23 Jul 2023 18:27:16 +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 4R8BbS0dSrz3hGS;
	Sun, 23 Jul 2023 18:27:16 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1690136836;
	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=gLKwc5RWuSxiQ1NRMMbp5cj+SrbZ2J6bOMajpN6Aukw=;
	b=shb0d+AihSqawDMi+DYxbY7IF0a16gtD/jFT8S9iKDrbTc37YzApEAS15u4WZPK2KJTyXw
	JX+G+UEFWOxMU9SmMN3KUeDcSgqASjQdqAUIQMXwuvs6FkKwYkymRWDHo5e1mt+2EqkmpW
	1v1PLkHZODdYWr3JQeVagpd//XCPcnw02IXWv7+zCXNPIgWfmUPHRsL/LqTofqhq7pncwD
	WNoHOtNI9g34falbhyc/TA1tpRjgNIl8wRQdTXK68w1T/J8FC6MJlExqWNzzfp2s5ZrrqH
	lzz8m3JWtOcLczdA8pPTWFwbNZ1eAoOZ7Z8OWKTpIWst5jdY+l1jCAEPJDMOAA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
	s=dkim; t=1690136836;
	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=gLKwc5RWuSxiQ1NRMMbp5cj+SrbZ2J6bOMajpN6Aukw=;
	b=gKUw3k+bois7lW2pbUqb9m8ixE5mkROhwLJZQmUalUtJjiuSDweK4+Wh9Y7h1zBarPj/VQ
	TXvMcMD/XgFiTgXZgH5alIorn/n1OdSbV0IDSsrFC6NBTqSkc3JE1pEG4luYp5fB+T/bYt
	DjVXGTLyADyz9OuIE5U1ga1XKVUH5DKNVMoEXUbOX8ETvzs9N7p2I9JeuuacfVmqBCHBo4
	N6chVyKKnlMsEY/8Om8UsvKESVAgoY13h+xGcxPMvVc+SrETQfvmgSYKrR+qhtAHgzq2QM
	gtHlgZLp42oUUfn/fhWe2L7kofpceLmuTpZbgpt1oCtiIXXpvyYl2+iSr+d5bw==
ARC-Authentication-Results: i=1;
	mx1.freebsd.org;
	none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690136836; a=rsa-sha256; cv=none;
	b=In0Idb7dom2s7kOHHLUBN3ZH3cWViu1Sbhj09pkDcCoeaD5O6CO7d3dOFwMuNuNUgw7LFJ
	Iyz5bY4c0MpXQtDTlzdHRBxzNOAAtIX5/wF46ONXe71iPR+nXepV8Ur0E5ljAhxA6VsNDb
	mpwJ1QmuYRqbw/ZmPjJjXdW9CIwGZogh1CZ8JeZcWrzpo6X2NU+9/xsIeORHDDvSIKDODr
	dUW1jpVzdFaRimMNUZac/s65GY9JCtxQpxubmVmpGO6HKLeYsJoCU8P44iBf5KESSMgrgC
	PCbP2E9iWSN23WlNemiEABIHYG7DyKx6JVRMrNEUepu+FN1kDY+sVP3JJAj5qw==
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 4R8BbR5xSLzmhk;
	Sun, 23 Jul 2023 18:27:15 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
	by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36NIRFN7058882;
	Sun, 23 Jul 2023 18:27:15 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36NIRF8X058881;
	Sun, 23 Jul 2023 18:27:15 GMT
	(envelope-from git)
Date: Sun, 23 Jul 2023 18:27:15 GMT
Message-Id: <202307231827.36NIRF8X058881@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Dimitry Andric <dim@FreeBSD.org>
Subject: git: 95955fb872c6 - stable/13 - Merge commit fde5924dcc69 from llvm-project (by Serge Pavlov):
List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: <mailto:dev-commits-src-branches+help@freebsd.org>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-branches+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-branches+unsubscribe@freebsd.org>
Sender: owner-dev-commits-src-branches@freebsd.org
X-BeenThere: dev-commits-src-branches@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: 95955fb872c6a51ff18804b93a2065185955c2a0
Auto-Submitted: auto-generated

The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=95955fb872c6a51ff18804b93a2065185955c2a0

commit 95955fb872c6a51ff18804b93a2065185955c2a0
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-07-13 18:57:22 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-07-23 17:38:12 +0000

    Merge commit fde5924dcc69 from llvm-project (by Serge Pavlov):
    
      [clang] Reset FP options before template instantiation
    
      AST nodes that may depend on FP options keep them as a difference
      relative to the options outside the AST node. At the moment of
      instantiation the FP options may be different from the default values,
      defined by command-line option. In such case FP attributes would have
      unexpected values. For example, the code:
    
          template <class C> void func_01(int last, C) {
            func_01(last, int());
          }
          void func_02() { func_01(0, 1); }
          #pragma STDC FENV_ACCESS ON
    
      caused compiler crash, because template instantiation takes place at the
      end of translation unit, where pragma STDC FENV_ACCESS is in effect. As
      a result, code in the template instantiation would use constrained
      intrinsics while the function does not have StrictFP attribute.
    
      To solve this problem, FP attributes in Sema must be set to default
      values, defined by command line options.
    
      This change resolves https://github.com/llvm/llvm-project/issues/63542.
    
      Differential Revision: https://reviews.llvm.org/D154359
    
    Requested by:   pkubaj
    PR:             265755, 265758
    MFC after:      1 month
    
    (cherry picked from commit 1cd9788408aa9ea4fd0fbc3e06bd9a4eaf8d8d22)
---
 contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 7a0da8d08333..bed5237749c5 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -5057,6 +5057,10 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
     // PushDeclContext because we don't have a scope.
     Sema::ContextRAII savedContext(*this, Function);
 
+    FPFeaturesStateRAII SavedFPFeatures(*this);
+    CurFPFeatures = FPOptions(getLangOpts());
+    FpPragmaStack.CurrentValue = FPOptionsOverride();
+
     if (addInstantiatedParametersToScope(Function, PatternDecl, Scope,
                                          TemplateArgs))
       return;