File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -7478,6 +7478,10 @@ StmtResult
7478
7478
TreeTransform<Derived>::TransformCompoundStmt(CompoundStmt *S,
7479
7479
bool IsStmtExpr) {
7480
7480
Sema::CompoundScopeRAII CompoundScope(getSema());
7481
+ Sema::FPFeaturesStateRAII FPSave(getSema());
7482
+ if (S->hasStoredFPFeatures())
7483
+ getSema().resetFPOptions(
7484
+ S->getStoredFPFeatures().applyOverrides(getSema().getLangOpts()));
7481
7485
7482
7486
const Stmt *ExprResult = S->getStmtExprResult();
7483
7487
bool SubStmtInvalid = false;
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -ast-dump -ast-dump-filter=b_64605 %s | FileCheck %s
2
+
3
+ // https://github.com/llvm/llvm-project/issues/64605
4
+
5
+ #pragma STDC FENV_ACCESS ON
6
+ template <typename >
7
+ int b_64605 () {
8
+ int x;
9
+ if ((float )0xFFFFFFFF != (float )0x100000000 ) {
10
+ x = 1 ;
11
+ }
12
+ return x;
13
+ }
14
+ int f () { return b_64605<void >(); }
15
+
16
+ // CHECK: ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
17
+ // CHECK-NEXT: IntegerLiteral {{.*}} 4294967295
18
+
19
+ // CHECK: FunctionDecl {{.*}} b_64605 'int ()' implicit_instantiation
20
+ // CHECK-NEXT: TemplateArgument type 'void'
21
+
22
+ // CHECK: ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
23
+ // CHECK-NEXT: IntegerLiteral {{.*}} 4294967295
You can’t perform that action at this time.
0 commit comments