Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for llvm/llvm-project#69717 #774

Merged
merged 3 commits into from
Nov 14, 2023
Merged

PR for llvm/llvm-project#69717 #774

merged 3 commits into from
Nov 14, 2023

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Nov 13, 2023

@tru
Copy link
Contributor

tru commented Nov 13, 2023

@rjmccall @spavloff @AaronBallman is this fine to backport to 17.x? (I think the answer is yes, but anyway :)

Copy link
Contributor

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

spavloff and others added 3 commits November 13, 2023 18:04
…0646)

When instantiation function, a call to Sema::resetFPOption was used to
set the FP options associated with AST node. However this function also
cleared FP pragma stack, and it is incorrect. Template instantiation
takes place on AST representation and semantic information like the FP
pragma stack should not affect it. This was a reason for miscompilation
in some cases.

To make the Sema interface more consistent, now `resetFPOptions` does
not clear FP pragma stack anymore. It is cleared in
`FpPragmaStackSaveRAII`, which is used in parsing only.

This change must fix llvm/llvm-project#69717
(Problems with float_control pragma stack in Clang 17.x).

(cherry picked from commit f6f625f4c6c3cbeb8cf6b889cdafc848dd4cb117)
The test Sema/PR69717.cpp fails on platforms that do not support
pragma float_control. So run this test on x86 only.

(cherry picked from commit 93ae26331592f41bf2b1d10b048743d80c468385)
Test still fail on ARM machine (no float_control support)

(cherry picked from commit 5fdb70be7b0a1340a7ebdeb94ab073e466fc4aa6)
@tru tru merged commit 42f8800 into release/17.x Nov 14, 2023
8 checks passed
@tru tru deleted the llvm-issue69717 branch November 14, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with float_control pragma stack in Clang 17.x
5 participants