Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(853)

Unified Diff: src/cmd/5c/cgen.c

Issue 7090043: code review 7090043: cmd/5c: fix handling of side effects when assigning a s... (Closed)
Patch Set: diff -r 182a8878488b https://code.google.com/p/go Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pkg/runtime/mgc0.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/5c/cgen.c
===================================================================
--- a/src/cmd/5c/cgen.c
+++ b/src/cmd/5c/cgen.c
@@ -950,9 +950,9 @@
case OSTRUCT:
/*
- * rewrite so lhs has no fn call
+ * rewrite so lhs has no side effect.
*/
- if(nn != Z && nn->complex >= FNX) {
+ if(nn != Z && side(nn)) {
nod1 = *n;
nod1.type = typ(TIND, n->type);
regret(&nod2, &nod1);
« no previous file with comments | « no previous file | src/pkg/runtime/mgc0.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b