Use symbolic names instead of magic values for the position parameter of get_irn_n().
[libfirm] / ir / be / test / types.c
index 08d55ce..d7c665a 100644 (file)
@@ -7,9 +7,9 @@ struct opcode {
 
 int main(void) {
   int i;
-  struct opcode oc;
+  struct opcode oc = { { 42 } };
 
-  i = oc.foo.imm16 & 0x8000;
-  printf("i: %d\n", i);
+  i = oc.foo.imm16 & 0x80f4;
+  printf("Result: %d (should be 32)\n", i);
   return 0;
 }