RVBTCC/test/misc/overflow.c

22 lines
569 B
C
Raw Normal View History

2024-12-08 07:41:38 +00:00
int printf(char* format, ...);
enum {
a = 1
};
int get_20() {
return (a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(- -0)))))))))))))))))))));
}
void dummy(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7) {
2024-12-24 07:00:51 +00:00
printf("%d %d\n", a0);
2024-12-08 07:41:38 +00:00
}
2024-12-08 03:40:47 +00:00
int main() {
2024-12-08 07:41:38 +00:00
char placeholder[4096];
2024-12-08 03:40:47 +00:00
int a = 1;
2024-12-24 07:00:51 +00:00
dummy((a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(! !0))))))))))))))))))))), a, a, a, a, a, a, a);
2024-12-12 15:21:34 +00:00
return (a=(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(a+(~ ~0)))))))))))))))))))))), (a = +a);
2024-12-08 03:40:47 +00:00
}