mirror of https://github.com/rui314/chibicc
17 lines
337 B
C
17 lines
337 B
C
#include "test.h"
|
|
|
|
int main() {
|
|
ASSERT(131585, (int)8590066177);
|
|
ASSERT(513, (short)8590066177);
|
|
ASSERT(1, (char)8590066177);
|
|
ASSERT(1, (long)1);
|
|
ASSERT(0, (long)&*(int *)0);
|
|
ASSERT(513, ({ int x=512; *(char *)&x=1; x; }));
|
|
ASSERT(5, ({ int x=5; long y=(long)&x; *(int*)y; }));
|
|
|
|
(void)1;
|
|
|
|
printf("OK\n");
|
|
return 0;
|
|
}
|