projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4073e47
)
[flang] Fix .NOT. folding bug
author
Jean Perier
<jperier@nvidia.com>
Thu, 21 Mar 2019 15:33:14 +0000
(08:33 -0700)
committer
Jean Perier
<jperier@nvidia.com>
Thu, 21 Mar 2019 15:33:14 +0000
(08:33 -0700)
Original-commit: flang-compiler/f18@
dd4d9091f15ce3912937b9ceaac7efbbf793d0b5
Tree-same-pre-rewrite: false
flang/lib/evaluate/fold.cc
patch
|
blob
|
history
diff --git
a/flang/lib/evaluate/fold.cc
b/flang/lib/evaluate/fold.cc
index
a72853b
..
83ab5e5
100644
(file)
--- a/
flang/lib/evaluate/fold.cc
+++ b/
flang/lib/evaluate/fold.cc
@@
-507,7
+507,7
@@
Expr<Type<TypeCategory::Logical, KIND>> FoldOperation(
auto &operand{x.left()};
operand = Fold(context, std::move(operand));
if (auto value{GetScalarConstantValue<Ty>(operand)}) {
- return Expr<Ty>{Constant<Ty>{value->IsTrue()}};
+ return Expr<Ty>{Constant<Ty>{
!
value->IsTrue()}};
}
return Expr<Ty>{x};
}