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
(from parent 1:
a688a70
)
[flang] Add return statement to Logical opeator=.
author
David Truby
<david.truby@arm.com>
Wed, 15 Apr 2020 11:55:42 +0000
(12:55 +0100)
committer
David Truby
<david.truby@arm.com>
Wed, 15 Apr 2020 12:18:42 +0000
(13:18 +0100)
This removes the current undefined behavior where the function has a return type
but no return statement.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=45530
flang/include/flang/Evaluate/logical.h
patch
|
blob
|
history
diff --git
a/flang/include/flang/Evaluate/logical.h
b/flang/include/flang/Evaluate/logical.h
index
44ba30a
..
ba3715a
100644
(file)
--- a/
flang/include/flang/Evaluate/logical.h
+++ b/
flang/include/flang/Evaluate/logical.h
@@
-29,6
+29,7
@@
public:
template <int B, bool C> constexpr Logical &operator=(Logical<B, C> x) {
word_ = Represent(x.IsTrue());
+ return *this;
}
// Fortran actually has only .EQV. & .NEQV. relational operations