📄 990326-1.c
字号:
struct a { char a, b; short c;};inta1(){ static struct a x = { 1, 2, ~1 }, y = { 65, 2, ~2 }; return (x.a == (y.a & ~64) && x.b == y.b);}inta2(){ static struct a x = { 1, 66, ~1 }, y = { 1, 2, ~2 }; return (x.a == y.a && (x.b & ~64) == y.b);}inta3(){ static struct a x = { 9, 66, ~1 }, y = { 33, 18, ~2 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}struct b { int c; short b, a;};intb1(){ static struct b x = { ~1, 2, 1 }, y = { ~2, 2, 65 }; return (x.a == (y.a & ~64) && x.b == y.b);}intb2(){ static struct b x = { ~1, 66, 1 }, y = { ~2, 2, 1 }; return (x.a == y.a && (x.b & ~64) == y.b);}intb3(){ static struct b x = { ~1, 66, 9 }, y = { ~2, 18, 33 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}struct c { unsigned int c:4, b:14, a:14;} __attribute__ ((aligned));intc1(){ static struct c x = { ~1, 2, 1 }, y = { ~2, 2, 65 }; return (x.a == (y.a & ~64) && x.b == y.b);}intc2(){ static struct c x = { ~1, 66, 1 }, y = { ~2, 2, 1 }; return (x.a == y.a && (x.b & ~64) == y.b);}intc3(){ static struct c x = { ~1, 66, 9 }, y = { ~2, 18, 33 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}struct d { unsigned int a:14, b:14, c:4;} __attribute__ ((aligned));intd1(){ static struct d x = { 1, 2, ~1 }, y = { 65, 2, ~2 }; return (x.a == (y.a & ~64) && x.b == y.b);}intd2(){ static struct d x = { 1, 66, ~1 }, y = { 1, 2, ~2 }; return (x.a == y.a && (x.b & ~64) == y.b);}intd3(){ static struct d x = { 9, 66, ~1 }, y = { 33, 18, ~2 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}struct e { int c:4, b:14, a:14;} __attribute__ ((aligned));inte1(){ static struct e x = { ~1, -2, -65 }, y = { ~2, -2, -1 }; return (x.a == (y.a & ~64) && x.b == y.b);}inte2(){ static struct e x = { ~1, -2, -1 }, y = { ~2, -66, -1 }; return (x.a == y.a && (x.b & ~64) == y.b);}inte3(){ static struct e x = { ~1, -18, -33 }, y = { ~2, -66, -9 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}inte4(){ static struct e x = { -1, -1, 0 }; return x.a == 0 && x.b & 0x2000;}struct f { int a:14, b:14, c:4;} __attribute__ ((aligned));intf1(){ static struct f x = { -65, -2, ~1 }, y = { -1, -2, ~2 }; return (x.a == (y.a & ~64) && x.b == y.b);}intf2(){ static struct f x = { -1, -2, ~1 }, y = { -1, -66, ~2 }; return (x.a == y.a && (x.b & ~64) == y.b);}intf3(){ static struct f x = { -33, -18, ~1 }, y = { -9, -66, ~2 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}intf4(){ static struct f x = { 0, -1, -1 }; return x.a == 0 && x.b & 0x2000;}struct gx { int c:4, b:14, a:14;} __attribute__ ((aligned));struct gy { int b:14, a:14, c:4;} __attribute__ ((aligned));intg1(){ static struct gx x = { ~1, -2, -65 }; static struct gy y = { -2, -1, ~2 }; return (x.a == (y.a & ~64) && x.b == y.b);}intg2(){ static struct gx x = { ~1, -2, -1 }; static struct gy y = { -66, -1, ~2 }; return (x.a == y.a && (x.b & ~64) == y.b);}intg3(){ static struct gx x = { ~1, -18, -33 }; static struct gy y = { -66, -9, ~2 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}intg4(){ static struct gx x = { ~1, 0x0020, 0x0010 }; static struct gy y = { 0x0200, 0x0100, ~2 }; return ((x.a & 0x00f0) == (y.a & 0x0f00) && (x.b & 0x00f0) == (y.b & 0x0f00));}intg5(){ static struct gx x = { ~1, 0x0200, 0x0100 }; static struct gy y = { 0x0020, 0x0010, ~2 }; return ((x.a & 0x0f00) == (y.a & 0x00f0) && (x.b & 0x0f00) == (y.b & 0x00f0));}intg6(){ static struct gx x = { ~1, 0xfe20, 0xfd10 }; static struct gy y = { 0xc22f, 0xc11f, ~2 }; return ((x.a & 0x03ff) == (y.a & 0x3ff0) && (x.b & 0x03ff) == (y.b & 0x3ff0));}intg7(){ static struct gx x = { ~1, 0xc22f, 0xc11f }; static struct gy y = { 0xfe20, 0xfd10, ~2 }; return ((x.a & 0x3ff0) == (y.a & 0x03ff) && (x.b & 0x3ff0) == (y.b & 0x03ff));}struct hx { int a:14, b:14, c:4;} __attribute__ ((aligned));struct hy { int c:4, a:14, b:14;} __attribute__ ((aligned));inth1(){ static struct hx x = { -65, -2, ~1 }; static struct hy y = { ~2, -1, -2 }; return (x.a == (y.a & ~64) && x.b == y.b);}inth2(){ static struct hx x = { -1, -2, ~1 }; static struct hy y = { ~2, -1, -66 }; return (x.a == y.a && (x.b & ~64) == y.b);}inth3(){ static struct hx x = { -33, -18, ~1 }; static struct hy y = { ~2, -9, -66 }; return ((x.a & ~8) == (y.a & ~32) && (x.b & ~64) == (y.b & ~16));}inth4(){ static struct hx x = { 0x0010, 0x0020, ~1 }; static struct hy y = { ~2, 0x0100, 0x0200 }; return ((x.a & 0x00f0) == (y.a & 0x0f00) && (x.b & 0x00f0) == (y.b & 0x0f00));}inth5(){ static struct hx x = { 0x0100, 0x0200, ~1 }; static struct hy y = { ~2, 0x0010, 0x0020 }; return ((x.a & 0x0f00) == (y.a & 0x00f0) && (x.b & 0x0f00) == (y.b & 0x00f0));}inth6(){ static struct hx x = { 0xfd10, 0xfe20, ~1 }; static struct hy y = { ~2, 0xc11f, 0xc22f }; return ((x.a & 0x03ff) == (y.a & 0x3ff0) && (x.b & 0x03ff) == (y.b & 0x3ff0));}inth7(){ static struct hx x = { 0xc11f, 0xc22f, ~1 }; static struct hy y = { ~2, 0xfd10, 0xfe20 }; return ((x.a & 0x3ff0) == (y.a & 0x03ff) && (x.b & 0x3ff0) == (y.b & 0x03ff));}intmain(){ if (!a1 ()) abort (); if (!a2 ()) abort (); if (!a3 ()) abort (); if (!b1 ()) abort (); if (!b2 ()) abort (); if (!b3 ()) abort (); if (!c1 ()) abort (); if (!c2 ()) abort (); if (!c3 ()) abort (); if (!d1 ()) abort (); if (!d2 ()) abort (); if (!d3 ()) abort (); if (!e1 ()) abort (); if (!e2 ()) abort (); if (!e3 ()) abort (); if (!e4 ()) abort (); if (!f1 ()) abort (); if (!f2 ()) abort (); if (!f3 ()) abort (); if (!f4 ()) abort (); if (!g1 ()) abort (); if (!g2 ()) abort (); if (!g3 ()) abort (); if (g4 ()) abort (); if (g5 ()) abort (); if (!g6 ()) abort (); if (!g7 ()) abort (); if (!h1 ()) abort (); if (!h2 ()) abort (); if (!h3 ()) abort (); if (h4 ()) abort (); if (h5 ()) abort (); if (!h6 ()) abort (); if (!h7 ()) abort (); exit (0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -