aboutsummaryrefslogtreecommitdiff
path: root/tests/struct-return-2.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-03 12:36:14 -0700
committerMichael Forney <mforney@mforney.org>2019-04-03 21:56:48 -0700
commit5b8a2d225ca3777c7b49421182bb5c1faf99ae64 (patch)
tree979f3ff190c9eb01c0a16dbce1f52e807f6daf2a /tests/struct-return-2.qbe
parentb3865e402e426387d4cdccdcd249a02d5ba1bc05 (diff)
Revert "Make member access its own expression type"
This reverts commit b3865e402e426387d4cdccdcd249a02d5ba1bc05. This breaks member address expressions in static initializers. We can support bit-fields by instead adding a "bit-field" expression that affects loads and stores to the underlying object.
Diffstat (limited to 'tests/struct-return-2.qbe')
-rw-r--r--tests/struct-return-2.qbe9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/struct-return-2.qbe b/tests/struct-return-2.qbe
index b1990ec..415ec2f 100644
--- a/tests/struct-return-2.qbe
+++ b/tests/struct-return-2.qbe
@@ -5,7 +5,10 @@ function w $f() {
@body.2
%.1 =:.1 call $g()
%.2 =l copy %.1
- %.3 =l add %.2, 4
- %.4 =w loadsw %.3
- ret %.4
+ %.3 =l copy %.2
+ %.4 =l mul 4, 1
+ %.5 =l add %.3, %.4
+ %.6 =l copy %.5
+ %.7 =w loadsw %.6
+ ret %.7
}