Repository navigation
Commit 5e50658
fix(compiler): compare the operand in ReadTemporaryExpr.isEquivalent
`ReadTemporaryExpr.isEquivalent()` didn't take the expression it was
compared against and compared its own `xref` with itself, so a temporary
read was considered equivalent to any expression, including reads of other
temporaries and unrelated expressions like literals.
Compare against the given expression instead, like the other IR
expressions do: it's only equivalent to a read of the same temporary.
No miscompilation is known to be caused by this, since temporaries are
usually converted to variables before expressions are compared, but the
result was wrong for any caller that compared them earlier.
(cherry picked from commit 3aaf026)1 parent 90af679 commit 5e50658
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
983 | 983 | | |
984 | 984 | | |
985 | 985 | | |
986 | | - | |
987 | | - | |
| 986 | + | |
| 987 | + | |
988 | 988 | | |
989 | 989 | | |
990 | 990 | | |
| |||
0 commit comments