Use ref_op in N_ID gen for static linkage too.
@@ -10092,7 +10092,7 @@ static op_t gen (node_t r, MIR_label_t true_label, MIR_label_t false_label, int
if (e->lvalue_node == NULL) {
res = new_op (NULL, MIR_new_ref_op (ctx, ((decl_t) e->def_node->attr)->item));
} else if ((decl = e->lvalue_node->attr)->scope == top_scope || decl->decl_spec.static_p
- || decl->decl_spec.linkage == N_EXTERN) {
+ || decl->decl_spec.linkage != N_IGNORE) {
t = get_mir_type (e->type);
res = get_new_temp (MIR_T_I64);
emit2 (MIR_MOV, res.mir_op, MIR_new_ref_op (ctx, decl->item));
