Skip to content

Commit

Permalink
go/ir: fix miscompilation of <<= and >>= statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikh committed Feb 22, 2024
1 parent d965e98 commit 3e57c5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/ir/UPSTREAM
Expand Up @@ -5,5 +5,5 @@ The changes are too many to list here, and it is best to consider this package i
Upstream changes still get applied when they address bugs in portions of code we have inherited.

The last upstream commit we've looked at was:
b900e8804030b22a099f187ef7bdc65bed470c7f
e854e0228e2ef1cc6e42bbfde1951925096a1272

3 changes: 1 addition & 2 deletions go/ir/builder.go
Expand Up @@ -1027,8 +1027,7 @@ func (b *builder) setCall(fn *Function, e *ast.CallExpr, c *CallCommon) {

// assignOp emits to fn code to perform loc <op>= val.
func (b *builder) assignOp(fn *Function, loc lvalue, val Value, op token.Token, source ast.Node) {
oldv := loc.load(fn, source)
loc.store(fn, emitArith(fn, op, oldv, emitConv(fn, val, oldv.Type(), source), loc.typ(), source), source)
loc.store(fn, emitArith(fn, op, loc.load(fn, source), val, loc.typ(), source), source)
}

// localValueSpec emits to fn code to define all of the vars in the
Expand Down

0 comments on commit 3e57c5d

Please sign in to comment.