--- /dev/null
+struct foo bar end;
+
+method f1(a b)
+ return 4 or 5;
+end;
+
+method f2(a b)
+ return a.foo or 0x55555555;
+end;
+
+method f3(a b)
+ return 0x55555555 or b.bar;
+end;
+
+method f4(a b)
+ return (a.bar - b.foo) or (a.foo - b.bar);
+end;
+
+method f5(a b)
+ return (a.bar < b.foo) or this;
+end;
+
+method f6(a b)
+ return this or (b.bar = a.foo);
+end;
+
+method f7(a b)
+ return a or b;
+end;
+
+method f8(a b)
+ return this or 0x112233;
+end;
+
+method f9(a b)
+ return 0x11EEEEFF or this;
+end;
--- /dev/null
+#define OR(a,b) ((long)(a) | (long)(b))
+
+long f1(long, long*, long*);
+long f2(long, long*, long*);
+long f3(long, long*, long*);
+long f4(long, long*, long*);
+long f5(long, long*, long*);
+long f6(long, long*, long*);
+long f7(long, long*, long*);
+long f8(long, long*, long*);
+long f9(long, long*, long*);
+
+long muh[] = {0x05f05f, 0x223344};
+long kuh[] = {0x00AACC, 0x563425};
+
+RET(f1(5, muh, kuh) == OR( 4, 5) &&
+ f2(5, muh, kuh) == OR( muh[0], 0x55555555) &&
+ f3(5, muh, kuh) == OR( 0x55555555, kuh[1]) &&
+ f4(5, muh, kuh) == OR(muh[1]-kuh[0], muh[0]-kuh[1]) &&
+ f5(5, muh, kuh) == OR( 0, 5) &&
+ f6(5, muh, kuh) == OR( 5, 0) &&
+ f7(5, muh, kuh) == OR( muh, kuh) &&
+ f8(5, muh, kuh) == OR( 5, 0x112233) &&
+ f9(5, muh, kuh) == OR( 0x11EEEEFF, 5)
+ );
+