def test_ssr(self):
    src = '\n        #include <stdio.h>\n\n        // see related things in openjpeg\n        typedef struct opj_mqc_state {\n          unsigned int qeval;\n          int mps;\n          struct opj_mqc_state *nmps;\n          struct opj_mqc_state *nlps;\n        } opj_mqc_state_t;\n\n        static opj_mqc_state_t mqc_states[4] = {\n          {0x5600, 0, &mqc_states[2], &mqc_states[3]},\n          {0x5602, 1, &mqc_states[3], &mqc_states[2]},\n        };\n\n        int main() {\n          printf("*%d*\\n", (int)(mqc_states+1)-(int)mqc_states);\n          for (int i = 0; i < 2; i++)\n            printf("%d:%d,%d,%d,%d\\n", i, mqc_states[i].qeval, mqc_states[i].mps,\n                   (int)mqc_states[i].nmps-(int)mqc_states, (int)mqc_states[i].nlps-(int)mqc_states);\n          return 0;\n        }\n        '
    self.do_run(src, '*16*\n0:22016,0,32,48\n1:22018,1,48,32\n')
def test_ssr(self):
    src = '\n        #include <stdio.h>\n\n        // see related things in openjpeg\n        typedef struct opj_mqc_state {\n          unsigned int qeval;\n          int mps;\n          struct opj_mqc_state *nmps;\n          struct opj_mqc_state *nlps;\n        } opj_mqc_state_t;\n\n        static opj_mqc_state_t mqc_states[4] = {\n          {0x5600, 0, &mqc_states[2], &mqc_states[3]},\n          {0x5602, 1, &mqc_states[3], &mqc_states[2]},\n        };\n\n        int main() {\n          printf("*%d*\\n", (int)(mqc_states+1)-(int)mqc_states);\n          for (int i = 0; i < 2; i++)\n            printf("%d:%d,%d,%d,%d\\n", i, mqc_states[i].qeval, mqc_states[i].mps,\n                   (int)mqc_states[i].nmps-(int)mqc_states, (int)mqc_states[i].nlps-(int)mqc_states);\n          return 0;\n        }\n        '
    self.do_run(src, '*16*\n0:22016,0,32,48\n1:22018,1,48,32\n')