1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <signal.h> 4 #include <setjmp.h> 5 #include <assert.h> 6 7 #include "arith_include1.c" 8 9 int main(void) 10 { 11 #include "arith_include2.c" 12 13 // Not testing the n&p-->p type cases, too hard to find an 'n' that gives 14 // something that looks like a pointer! (Eg. if the pointer is 15 // 0x40c38000, masking to 0x40000000 won't give invalid memory, and 16 // masking below that, eg. to 0x00c38000 doesn't give a pointer result.) 17 18 // AND ========================================================= 19 g(&, n, n, n); // det, det 20 21 g(&, n, p, n); // det, det 22 g(&, nFF,p, n); // ok, det 23 24 g(&, p, n, n); // det, det 25 g(&, p, nFF,n); // ok, det 26 27 g(&, p, p, p); // ok, det 28 g(&, p, p2, e); // bad AND detected; det, det 29 30 g(&, n, un, n); // det, det 31 g(&, n, up, n); // det, det 32 33 g(&, un, n, n); // det, det 34 g(&, up, n, n); // det, det 35 36 g(&, un, un, u); // undet, undet 37 g(&, un, up, n); // det, det 38 g(&, up, un, n); // det, det 39 g(&, up, up, u); // ok, undet 40 g(&, up, up2,u); // undet, undet 41 42 g(&, un, p, n); // det, det 43 g(&, up, p, n); // det, det (result doesn't look like a pointer) 44 45 g(&, p, un, n); // det, det 46 g(&, p, up, u); // det, det 47 48 return 0; 49 } 50