@@ -282,11 +282,11 @@ def visit_LETARRAY(self, node):
282282 if self .O_LEVEL > 1 and not node .children [0 ].entry .accessed :
283283 return
284284
285- yield node .children [1 ] # Right expression
286285 arr = node .children [0 ] # Array access
287286 scope = arr .scope
288287
289288 if arr .offset is None :
289+ yield node .children [1 ] # Right expression
290290 yield arr
291291
292292 if scope == SCOPE .global_ :
@@ -299,14 +299,17 @@ def visit_LETARRAY(self, node):
299299 else :
300300 name = arr .entry .data_label
301301 if scope == SCOPE .global_ :
302+ yield node .children [1 ] # Right expression
302303 self .ic_store (arr .type_ , '%s + %i' % (name , arr .offset ), node .children [1 ].t )
303304 elif scope == SCOPE .local :
304305 t1 = optemps .new_t ()
305306 t2 = optemps .new_t ()
306307 self .ic_pload (gl .PTR_TYPE , t1 , - (arr .entry .offset - self .TYPE (gl .PTR_TYPE ).size ))
307308 self .ic_add (gl .PTR_TYPE , t2 , t1 , arr .offset )
309+ yield node .children [1 ] # Right expression
310+
308311 if arr .type_ == Type .string :
309- self .ic_store (arr .type_ , '*{}' . format ( t2 ) , node .children [1 ].t )
312+ self .ic_store (arr .type_ , f '*{ t2 } ' , node .children [1 ].t )
310313 else :
311314 self .ic_store (arr .type_ , t2 , node .children [1 ].t )
312315 else :
0 commit comments