Fixes fd.o bug 27216. May also be the root cause of fd.o bug 28950.
We weren't propogating the storage info for the x=foo() expression up
through the IR tree to the inequality expression.
NOTE: This is a candidate for the Mesa 7.8 branch.
#if 0
assert(!n->Store);
#endif
- n->Store = n->Children[1]->Store;
+ if (n->Children[1]->Store)
+ n->Store = n->Children[1]->Store;
+ else
+ n->Store = n->Children[0]->Store;
return inst;
case IR_SCOPE:
_slang_push_var_table(emitInfo->vt);
inst = emit(emitInfo, n->Children[0]);
_slang_pop_var_table(emitInfo->vt);
+ n->Store = n->Children[0]->Store;
return inst;
case IR_VAR_DECL: