-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silence clang warn #305
Silence clang warn #305
Conversation
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3109013702 fizzbuzz.bc--- /dev/fd/63 2022-09-22 22:03:12.273403766 +0000
+++ /dev/fd/62 2022-09-22 22:03:12.273403766 +0000
@@ -1,17 +1,17 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[10] = "fizzbuzz\n\000";
-unsigned char _str_1[6] = "fizz\n\000";
-unsigned char _str_2[6] = "buzz\n\000";
-unsigned char _str_3[4] = "%d\n\000";
-unsigned int main() {
+char _str[10] = "fizzbuzz\n\000";
+char _str_1[6] = "fizz\n\000";
+char _str_2[6] = "buzz\n\000";
+char _str_3[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U;
var1 = 0U;
while ((int)var1 < 30)
{
- if (!((int)var1 % 3 != 0U || (int)var1 % 5 == 0U) || (int)var1 % 3 != 0U) {
+ if ((int)var1 % 3 != 0U || !((int)var1 % 5 == 0U || (int)var1 % 3 != 0U)) {
if ((int)var1 % 3 != 0U) {
if ((int)var1 % 5 != 0U) {
printf("%d\n", var1); typedefs_of_typedefs.bc--- /dev/fd/63 2022-09-22 22:03:12.941410386 +0000
+++ /dev/fd/62 2022-09-22 22:03:12.941410386 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[11] = "a=[%d %d]\n\000";
-unsigned char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
+char _str[11] = "a=[%d %d]\n\000";
+char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
unsigned long array[4] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var1;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var2; switch_loop.bc--- /dev/fd/63 2022-09-22 22:03:12.993410902 +0000
+++ /dev/fd/62 2022-09-22 22:03:12.993410902 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; func_cond_zero_arg.bc--- /dev/fd/63 2022-09-22 22:03:13.185412789 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.185412789 +0000
@@ -1,11 +1,11 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; fcmp.bc--- /dev/fd/63 2022-09-22 22:03:13.289413811 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.289413811 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
float atof(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "3\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[19] = "%d %d %d %d %d %d\n\000";
-unsigned int main() {
+char _str[2] = "3\000";
+char _str_1[2] = "2\000";
+char _str_2[19] = "%d %d %d %d %d %d\n\000";
+int main() {
float var0;
float var1;
float var2; conflicting_names.bc--- /dev/fd/63 2022-09-22 22:03:13.345414361 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.345414361 +0000
@@ -1,6 +1,6 @@
unsigned int foo();
unsigned int bar();
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int foo() {
unsigned int var0;
@@ -12,7 +12,7 @@
var0 = 1U;
return var0;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
void *var2; struct.bc--- /dev/fd/63 2022-09-22 22:03:13.497415854 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.497415854 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (a.field0 == 0U) { issue_183_literal_structs.bc--- /dev/fd/63 2022-09-22 22:03:13.601416876 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.601416876 +0000
@@ -11,9 +11,9 @@
struct union_anon field2;
struct union_anon_0 field3;
};
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
+char _str[4] = "%d\n\000";
struct literal_struct_0 {
unsigned long field0;
unsigned long field1;
@@ -26,7 +26,7 @@
((struct literal_struct_0 *)val1)->field1 = arg1;
return *(unsigned int *)(&var0.field3);
}
-unsigned int main() {
+int main() {
struct struct_foo_t var0;
void *val1;
unsigned int call2; issue_127_uint128_t_lit.bc--- /dev/fd/63 2022-09-22 22:03:13.661417466 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.661417466 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned __int128 x = (unsigned __int128)3735928559ULL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned char val1;
var0 = 0U; global_using_function_decl.bc--- /dev/fd/63 2022-09-22 22:03:13.709417937 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.709417937 +0000
@@ -1,12 +1,12 @@
void some_func(unsigned int arg0);
-unsigned int main();
+int main();
void *afunc_pointer = &some_func;
void some_func(unsigned int arg0) {
unsigned int var0;
var0 = arg0;
return;
}
-unsigned int main() {
+int main() {
((void (*)(unsigned int))afunc_pointer)(0U);
return 0U;
} short.bc--- /dev/fd/63 2022-09-22 22:03:13.765418488 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.765418488 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned short a = (unsigned short)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned short var1;
var0 = 0U; init_list.bc--- /dev/fd/63 2022-09-22 22:03:13.817418998 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.817418998 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[5] = {0U, 1U, 2U, 3U, 4U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return a[1UL]; reg_test_structure_fields.bc--- /dev/fd/63 2022-09-22 22:03:13.865419469 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.865419469 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct_a {
unsigned int field0;
};
struct struct_b {
struct struct_a field0;
};
-unsigned int main() {
+int main() {
struct struct_b var0;
return 0U;
} ret0.bc--- /dev/fd/63 2022-09-22 22:03:13.917419981 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.917419981 +0000
@@ -1,9 +1,9 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; goto_loop.bc--- /dev/fd/63 2022-09-22 22:03:13.973420531 +0000
+++ /dev/fd/62 2022-09-22 22:03:13.973420531 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; trunc.bc--- /dev/fd/63 2022-09-22 22:03:14.189422637 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.189422637 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 18446744073709551615UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; bitops.bc--- /dev/fd/63 2022-09-22 22:03:14.241423144 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.241423144 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int a = 255U;
unsigned int b = 7U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; cast.bc--- /dev/fd/63 2022-09-22 22:03:14.385424545 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.385424545 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)(&a); nullptr.bc--- /dev/fd/63 2022-09-22 22:03:14.437425051 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.437425051 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
void *ptr = (void *)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (ptr != (void *)0U) { nested_struct.bc--- /dev/fd/63 2022-09-22 22:03:14.537426025 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.537426025 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "Bob\000";
+char _str[4] = "Bob\000";
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -15,8 +15,8 @@
struct struct__person field2;
};
struct struct__record r1 = {14U, {33U, 42U}, {"Bob", (unsigned char)66U}};
-unsigned char _str_1[9] = "Name: %s\000";
-unsigned int main() {
+char _str_1[9] = "Name: %s\000";
+int main() {
unsigned int var0;
var0 = 0U;
printf("Name: %s", r1.field2.field0); array_swap.bc--- /dev/fd/63 2022-09-22 22:03:14.589426531 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.589426531 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[2] = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; bitmask.bc--- /dev/fd/63 2022-09-22 22:03:14.641427038 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.641427038 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 43981UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((a & 4080UL) >> 4UL != 188UL) { binops.bc--- /dev/fd/63 2022-09-22 22:03:14.745428051 +0000
+++ /dev/fd/62 2022-09-22 22:03:14.745428051 +0000
@@ -1,5 +1,5 @@
unsigned int target(unsigned int arg0);
-unsigned int main();
+int main();
unsigned int target(unsigned int arg0) {
unsigned int var0;
unsigned int var1;
@@ -22,7 +22,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; float.bc--- /dev/fd/63 2022-09-22 22:03:15.001430545 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.001430545 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
float f = 3.1400001F;
-unsigned int main() {
+int main() {
unsigned int var0;
double var1;
double var2; nested_while.bc--- /dev/fd/63 2022-09-22 22:03:15.101431509 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.101431509 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "5\000";
-unsigned char _str_1[13] = "loop1 x: %d\n\000";
-unsigned char _str_2[13] = "loop2 x: %d\n\000";
-unsigned int main() {
+char _str[2] = "5\000";
+char _str_1[13] = "loop1 x: %d\n\000";
+char _str_2[13] = "loop2 x: %d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
unsigned int call2;
@@ -18,14 +18,14 @@
printf("loop1 x: %d\n", var1);
}
}
- if ((int)var1 <= 10 || (int)var1 >= 20) {
+ if ((int)var1 >= 20 || (int)var1 <= 10) {
while ((int)var1 < 20)
{
var1 = var1 + 1U;
printf("loop2 x: %d\n", var1);
}
}
- if ((int)var1 >= 20 && ((int)var1 <= 10 || (int)var1 >= 20)) {
+ if (((int)var1 >= 20 || (int)var1 <= 10) && (int)var1 >= 20) {
return var0;
}
} zeroinit.bc--- /dev/fd/63 2022-09-22 22:03:15.421434597 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.421434597 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -14,7 +14,7 @@
};
struct struct__record r1 = {};
unsigned long a1[256] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (r1.field1.field0 == 0U) { funcptr.bc--- /dev/fd/63 2022-09-22 22:03:15.573436064 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.573436064 +0000
@@ -1,6 +1,6 @@
unsigned int add(unsigned int arg0, unsigned int arg1);
unsigned int sub(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int add(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
@@ -16,7 +16,7 @@
var1 = arg1;
return var0 - var1;
}
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
unsigned int call2; struct_swap.bc--- /dev/fd/63 2022-09-22 22:03:15.681437107 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.681437107 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; branch.bc--- /dev/fd/63 2022-09-22 22:03:15.733437608 +0000
+++ /dev/fd/62 2022-09-22 22:03:15.733437608 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 0U;
unsigned int c = 1U;
-unsigned char _str[39] = "Global variable 'a' of value %u is at \000";
-unsigned char _str_1[6] = "even \000";
-unsigned char _str_2[5] = "odd \000";
-unsigned char _str_3[39] = "Global variable 'c' of value %u is at \000";
-unsigned char _str_4[10] = "address.\n\000";
-unsigned int main() {
+char _str[39] = "Global variable 'a' of value %u is at \000";
+char _str_1[6] = "even \000";
+char _str_2[5] = "odd \000";
+char _str_3[39] = "Global variable 'c' of value %u is at \000";
+char _str_4[10] = "address.\n\000";
+int main() {
unsigned int var0;
unsigned long var1;
unsigned long var2; vectors.bc--- /dev/fd/63 2022-09-22 22:03:16.017440349 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.017440349 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[17] = "a=[%d %d %d %d]\n\000";
-unsigned int main() {
+char _str[17] = "a=[%d %d %d %d]\n\000";
+int main() {
unsigned int var0;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var1;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var2; issue_4.bc--- /dev/fd/63 2022-09-22 22:03:16.069440846 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.069440846 +0000
@@ -1,5 +1,5 @@
unsigned int foo(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int foo(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
unsigned int var1;
@@ -17,7 +17,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; conflicting_global.bc--- /dev/fd/63 2022-09-22 22:03:16.209442186 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.209442186 +0000
@@ -1,8 +1,8 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 3U;
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
var0 = 4U;
printf("%d\n", var0); issue_123_uint128_t.bc--- /dev/fd/63 2022-09-22 22:03:16.261442684 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.261442684 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long x = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned __int128 var1;
var0 = 0U; fizzbuzz_stateful.bc--- /dev/fd/63 2022-09-22 22:03:16.309443142 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.309443142 +0000
@@ -1,11 +1,11 @@
void fizzbuzz();
unsigned int printf(void *arg0, ...);
-unsigned int main();
+int main();
unsigned int i = 0U;
-unsigned char _str[5] = "fizz\000";
-unsigned char _str_1[5] = "buzz\000";
-unsigned char _str_2[3] = "%d\000";
-unsigned char _str_3[2] = "\n\000";
+char _str[5] = "fizz\000";
+char _str_1[5] = "buzz\000";
+char _str_2[3] = "%d\000";
+char _str_3[2] = "\n\000";
void fizzbuzz() {
unsigned int var0;
var0 = i;
@@ -24,7 +24,7 @@
i = var0;
return;
}
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
i = 1U; issue_94_strncmp.bc--- /dev/fd/63 2022-09-22 22:03:16.621446127 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.621446127 +0000
@@ -1,16 +1,16 @@
-unsigned int main();
+int main();
void *strcpy(void *arg0, void *arg1);
unsigned int strncmp(void *arg0, void *arg1, unsigned long arg2);
unsigned int printf(void *arg0, ...);
-unsigned char _str[6] = "hello\000";
-unsigned char _str_1[12] = "helLO WORLD\000";
-unsigned char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
-unsigned char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
-unsigned char _str_4[41] = "Both the strings str1 and str2 are equal\000";
-unsigned int main() {
+char _str[6] = "hello\000";
+char _str_1[12] = "helLO WORLD\000";
+char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
+char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
+char _str_4[41] = "Both the strings str1 and str2 are equal\000";
+int main() {
unsigned int var0;
- unsigned char var1[20];
- unsigned char var2[20];
+ char var1[20];
+ char var2[20];
unsigned int call3;
unsigned int call4;
var0 = 0U; bool.bc--- /dev/fd/63 2022-09-22 22:03:16.781447658 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.781447658 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned long a = 0UL;
unsigned long b = 1UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((unsigned int)(a == b) != 0U) { zext.bc--- /dev/fd/63 2022-09-22 22:03:16.877448576 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.877448576 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
-unsigned char a = (unsigned char)1U;
-unsigned int main() {
+int main();
+char a = (unsigned char)1U;
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; byval_struct.bc--- /dev/fd/63 2022-09-22 22:03:16.929449074 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.929449074 +0000
@@ -5,20 +5,20 @@
unsigned long field3;
};
unsigned long get_3x(struct struct_foo arg0);
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "1\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[2] = "3\000";
-unsigned char _str_3[2] = "4\000";
-unsigned char _str_4[11] = "%lld %lld\n\000";
+char _str[2] = "1\000";
+char _str_1[2] = "2\000";
+char _str_2[2] = "3\000";
+char _str_3[2] = "4\000";
+char _str_4[11] = "%lld %lld\n\000";
unsigned long get_3x(struct struct_foo arg0) {
void *arg0_ptr = &arg0;
((struct struct_foo *)arg0_ptr)->field0 = ((struct struct_foo *)arg0_ptr)->field0 * 3UL;
return ((struct struct_foo *)arg0_ptr)->field0;
}
-unsigned int main() {
+int main() {
struct struct_foo var0;
unsigned long var1;
unsigned int call2; func_cond_two_arg.bc--- /dev/fd/63 2022-09-22 22:03:16.985449610 +0000
+++ /dev/fd/62 2022-09-22 22:03:16.985449610 +0000
@@ -1,5 +1,5 @@
unsigned int f(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f(unsigned int arg0, unsigned int arg1) {
@@ -9,7 +9,7 @@
var1 = arg1;
return (unsigned int)((int)var0 < (int)var1);
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; inttoptr.bc--- /dev/fd/63 2022-09-22 22:03:17.089450597 +0000
+++ /dev/fd/62 2022-09-22 22:03:17.089450597 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
var0 = 0U; assert.bc--- /dev/fd/63 2022-09-22 22:03:17.189451545 +0000
+++ /dev/fd/62 2022-09-22 22:03:17.189451545 +0000
@@ -1,12 +1,12 @@
-unsigned int main();
+int main();
void __assert_fail(void *arg0, void *arg1, unsigned int arg2, void *arg3);
unsigned long a = 1UL;
-unsigned char _str[6] = "a % 3\000";
-unsigned char _str_1[9] = "assert.c\000";
-unsigned char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
-unsigned char _str_2[6] = "a % 7\000";
-unsigned char _str_3[7] = "a % 15\000";
-unsigned int main() {
+char _str[6] = "a % 3\000";
+char _str_1[9] = "assert.c\000";
+char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
+char _str_2[6] = "a % 7\000";
+char _str_3[7] = "a % 15\000";
+int main() {
unsigned int var0;
var0 = 0U;
if (a % 3UL == 0UL) { loop.bc--- /dev/fd/63 2022-09-22 22:03:17.365453215 +0000
+++ /dev/fd/62 2022-09-22 22:03:17.365453215 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[19] = "Variable at %d is \000";
-unsigned char _str_1[7] = "even.\n\000";
-unsigned char _str_2[6] = "odd.\n\000";
-unsigned int main() {
+char _str[19] = "Variable at %d is \000";
+char _str_1[7] = "even.\n\000";
+char _str_2[6] = "odd.\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; switch.bc--- /dev/fd/63 2022-09-22 22:03:17.573455187 +0000
+++ /dev/fd/62 2022-09-22 22:03:17.573455187 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 12U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; template_parameter_pack.bc--- /dev/fd/63 2022-09-22 22:03:17.685456250 +0000
+++ /dev/fd/62 2022-09-22 22:03:17.685456250 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int _Z3sumIiJiiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4);
unsigned int _Z3sumIiJiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3);
unsigned int _Z3sumIiJiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2);
unsigned int _Z3sumIiET_S0_S0_(unsigned int arg0, unsigned int arg1);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int call0;
call0 = _Z3sumIiJiiiiEET_S0_DpT0_(1U, 2U, 3U, 4U, 5U);
printf("%d\n", call0); byval_tail_gep.llbyval_tail_nogep.ll |
LGTM! Let's wait for the other PRs to be merged, then it's good to go. |
c737a8a
to
5fc2ca8
Compare
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3176174167 fizzbuzz.bc--- /dev/fd/63 2022-10-03 17:37:34.032740537 +0000
+++ /dev/fd/62 2022-10-03 17:37:34.032740537 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[10] = "fizzbuzz\n\000";
-unsigned char _str_1[6] = "fizz\n\000";
-unsigned char _str_2[6] = "buzz\n\000";
-unsigned char _str_3[4] = "%d\n\000";
-unsigned int main() {
+char _str[10] = "fizzbuzz\n\000";
+char _str_1[6] = "fizz\n\000";
+char _str_2[6] = "buzz\n\000";
+char _str_3[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; typedefs_of_typedefs.bc--- /dev/fd/63 2022-10-03 17:37:34.660736261 +0000
+++ /dev/fd/62 2022-10-03 17:37:34.660736261 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[11] = "a=[%d %d]\n\000";
-unsigned char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
+char _str[11] = "a=[%d %d]\n\000";
+char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
unsigned long array[4] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var1;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var2; switch_loop.bc--- /dev/fd/63 2022-10-03 17:37:34.712735907 +0000
+++ /dev/fd/62 2022-10-03 17:37:34.712735907 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; func_cond_zero_arg.bc--- /dev/fd/63 2022-10-03 17:37:34.888734709 +0000
+++ /dev/fd/62 2022-10-03 17:37:34.888734709 +0000
@@ -1,11 +1,11 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; fcmp.bc--- /dev/fd/63 2022-10-03 17:37:34.988734028 +0000
+++ /dev/fd/62 2022-10-03 17:37:34.988734028 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
float atof(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "3\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[19] = "%d %d %d %d %d %d\n\000";
-unsigned int main() {
+char _str[2] = "3\000";
+char _str_1[2] = "2\000";
+char _str_2[19] = "%d %d %d %d %d %d\n\000";
+int main() {
float var0;
float var1;
float var2; conflicting_names.bc--- /dev/fd/63 2022-10-03 17:37:35.040733677 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.040733677 +0000
@@ -1,6 +1,6 @@
unsigned int foo();
unsigned int bar();
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int foo() {
unsigned int var0;
@@ -12,7 +12,7 @@
var0 = 1U;
return var0;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
void *var2; struct.bc--- /dev/fd/63 2022-10-03 17:37:35.176732759 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.176732759 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (a.field0 == 0U) { issue_183_literal_structs.bc--- /dev/fd/63 2022-10-03 17:37:35.272732113 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.272732113 +0000
@@ -11,9 +11,9 @@
struct union_anon field2;
struct union_anon_0 field3;
};
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
+char _str[4] = "%d\n\000";
struct literal_struct_0 {
unsigned long field0;
unsigned long field1;
@@ -26,7 +26,7 @@
((struct literal_struct_0 *)val1)->field1 = arg1;
return *(unsigned int *)(&var0.field3);
}
-unsigned int main() {
+int main() {
struct struct_foo_t var0;
void *val1;
unsigned int call2; issue_127_uint128_t_lit.bc--- /dev/fd/63 2022-10-03 17:37:35.328731736 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.328731736 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned __int128 x = (unsigned __int128)3735928559ULL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned char val1;
var0 = 0U; global_using_function_decl.bc--- /dev/fd/63 2022-10-03 17:37:35.380731385 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.380731385 +0000
@@ -1,12 +1,12 @@
void some_func(unsigned int arg0);
-unsigned int main();
+int main();
void *afunc_pointer = &some_func;
void some_func(unsigned int arg0) {
unsigned int var0;
var0 = arg0;
return;
}
-unsigned int main() {
+int main() {
((void (*)(unsigned int))afunc_pointer)(0U);
return 0U;
} short.bc--- /dev/fd/63 2022-10-03 17:37:35.432731034 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.432731034 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned short a = (unsigned short)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned short var1;
var0 = 0U; init_list.bc--- /dev/fd/63 2022-10-03 17:37:35.484730684 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.484730684 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[5] = {0U, 1U, 2U, 3U, 4U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return a[1UL]; reg_test_structure_fields.bc--- /dev/fd/63 2022-10-03 17:37:35.532730360 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.532730360 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct_a {
unsigned int field0;
};
struct struct_b {
struct struct_a field0;
};
-unsigned int main() {
+int main() {
struct struct_b var0;
return 0U;
} ret0.bc--- /dev/fd/63 2022-10-03 17:37:35.580730036 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.584730010 +0000
@@ -1,9 +1,9 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; goto_loop.bc--- /dev/fd/63 2022-10-03 17:37:35.636729659 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.636729659 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; trunc.bc--- /dev/fd/63 2022-10-03 17:37:35.844728257 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.844728257 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 18446744073709551615UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; bitops.bc--- /dev/fd/63 2022-10-03 17:37:35.896727907 +0000
+++ /dev/fd/62 2022-10-03 17:37:35.896727907 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int a = 255U;
unsigned int b = 7U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; cast.bc--- /dev/fd/63 2022-10-03 17:37:36.040726939 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.040726939 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)(&a); nullptr.bc--- /dev/fd/63 2022-10-03 17:37:36.088726618 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.088726618 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
void *ptr = (void *)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (ptr != (void *)0U) { nested_struct.bc--- /dev/fd/63 2022-10-03 17:37:36.188725952 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.188725952 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "Bob\000";
+char _str[4] = "Bob\000";
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -15,8 +15,8 @@
struct struct__person field2;
};
struct struct__record r1 = {14U, {33U, 42U}, {"Bob", (unsigned char)66U}};
-unsigned char _str_1[9] = "Name: %s\000";
-unsigned int main() {
+char _str_1[9] = "Name: %s\000";
+int main() {
unsigned int var0;
var0 = 0U;
printf("Name: %s", r1.field2.field0); array_swap.bc--- /dev/fd/63 2022-10-03 17:37:36.240725604 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.240725604 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[2] = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; bitmask.bc--- /dev/fd/63 2022-10-03 17:37:36.288725284 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.288725284 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 43981UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((a & 4080UL) >> 4UL != 188UL) { binops.bc--- /dev/fd/63 2022-10-03 17:37:36.388724617 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.388724617 +0000
@@ -1,5 +1,5 @@
unsigned int target(unsigned int arg0);
-unsigned int main();
+int main();
unsigned int target(unsigned int arg0) {
unsigned int var0;
unsigned int var1;
@@ -22,7 +22,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; float.bc--- /dev/fd/63 2022-10-03 17:37:36.628723015 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.628723015 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
float f = 3.1400001F;
-unsigned int main() {
+int main() {
unsigned int var0;
double var1;
double var2; nested_while.bc--- /dev/fd/63 2022-10-03 17:37:36.724722374 +0000
+++ /dev/fd/62 2022-10-03 17:37:36.724722374 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "5\000";
-unsigned char _str_1[13] = "loop1 x: %d\n\000";
-unsigned char _str_2[13] = "loop2 x: %d\n\000";
-unsigned int main() {
+char _str[2] = "5\000";
+char _str_1[13] = "loop1 x: %d\n\000";
+char _str_2[13] = "loop2 x: %d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
unsigned int call2;
@@ -18,14 +18,14 @@
printf("loop1 x: %d\n", var1);
}
}
- if ((int)var1 <= 10 || (int)var1 >= 20) {
+ if ((int)var1 >= 20 || (int)var1 <= 10) {
while ((int)var1 < 20)
{
var1 = var1 + 1U;
printf("loop2 x: %d\n", var1);
}
}
- if ((int)var1 >= 20 && ((int)var1 <= 10 || (int)var1 >= 20)) {
+ if ((int)var1 >= 20 && ((int)var1 >= 20 || (int)var1 <= 10)) {
return var0;
}
} zeroinit.bc--- /dev/fd/63 2022-10-03 17:37:37.044720241 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.048720215 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -14,7 +14,7 @@
};
struct struct__record r1 = {};
unsigned long a1[256] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (r1.field1.field0 == 0U) { funcptr.bc--- /dev/fd/63 2022-10-03 17:37:37.192719263 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.192719263 +0000
@@ -1,6 +1,6 @@
unsigned int add(unsigned int arg0, unsigned int arg1);
unsigned int sub(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int add(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
@@ -16,7 +16,7 @@
var1 = arg1;
return var0 - var1;
}
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
unsigned int call2; struct_swap.bc--- /dev/fd/63 2022-10-03 17:37:37.292718602 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.292718602 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; branch.bc--- /dev/fd/63 2022-10-03 17:37:37.344718259 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.344718259 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 0U;
unsigned int c = 1U;
-unsigned char _str[39] = "Global variable 'a' of value %u is at \000";
-unsigned char _str_1[6] = "even \000";
-unsigned char _str_2[5] = "odd \000";
-unsigned char _str_3[39] = "Global variable 'c' of value %u is at \000";
-unsigned char _str_4[10] = "address.\n\000";
-unsigned int main() {
+char _str[39] = "Global variable 'a' of value %u is at \000";
+char _str_1[6] = "even \000";
+char _str_2[5] = "odd \000";
+char _str_3[39] = "Global variable 'c' of value %u is at \000";
+char _str_4[10] = "address.\n\000";
+int main() {
unsigned int var0;
unsigned long var1;
unsigned long var2; vectors.bc--- /dev/fd/63 2022-10-03 17:37:37.636716328 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.640716302 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[17] = "a=[%d %d %d %d]\n\000";
-unsigned int main() {
+char _str[17] = "a=[%d %d %d %d]\n\000";
+int main() {
unsigned int var0;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var1;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var2; issue_4.bc--- /dev/fd/63 2022-10-03 17:37:37.688715985 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.688715985 +0000
@@ -1,5 +1,5 @@
unsigned int foo(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int foo(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
unsigned int var1;
@@ -17,7 +17,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; conflicting_global.bc--- /dev/fd/63 2022-10-03 17:37:37.832715034 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.832715034 +0000
@@ -1,8 +1,8 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 3U;
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
var0 = 4U;
printf("%d\n", var0); issue_123_uint128_t.bc--- /dev/fd/63 2022-10-03 17:37:37.880714716 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.880714716 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long x = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned __int128 var1;
var0 = 0U; fizzbuzz_stateful.bc--- /dev/fd/63 2022-10-03 17:37:37.932714372 +0000
+++ /dev/fd/62 2022-10-03 17:37:37.932714372 +0000
@@ -1,11 +1,11 @@
void fizzbuzz();
unsigned int printf(void *arg0, ...);
-unsigned int main();
+int main();
unsigned int i = 0U;
-unsigned char _str[5] = "fizz\000";
-unsigned char _str_1[5] = "buzz\000";
-unsigned char _str_2[3] = "%d\000";
-unsigned char _str_3[2] = "\n\000";
+char _str[5] = "fizz\000";
+char _str_1[5] = "buzz\000";
+char _str_2[3] = "%d\000";
+char _str_3[2] = "\n\000";
void fizzbuzz() {
unsigned int var0;
var0 = i;
@@ -24,7 +24,7 @@
i = var0;
return;
}
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
i = 1U; issue_94_strncmp.bc--- /dev/fd/63 2022-10-03 17:37:38.236712378 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.236712378 +0000
@@ -1,16 +1,16 @@
-unsigned int main();
+int main();
void *strcpy(void *arg0, void *arg1);
unsigned int strncmp(void *arg0, void *arg1, unsigned long arg2);
unsigned int printf(void *arg0, ...);
-unsigned char _str[6] = "hello\000";
-unsigned char _str_1[12] = "helLO WORLD\000";
-unsigned char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
-unsigned char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
-unsigned char _str_4[41] = "Both the strings str1 and str2 are equal\000";
-unsigned int main() {
+char _str[6] = "hello\000";
+char _str_1[12] = "helLO WORLD\000";
+char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
+char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
+char _str_4[41] = "Both the strings str1 and str2 are equal\000";
+int main() {
unsigned int var0;
- unsigned char var1[20];
- unsigned char var2[20];
+ char var1[20];
+ char var2[20];
unsigned int call3;
unsigned int call4;
var0 = 0U; bool.bc--- /dev/fd/63 2022-10-03 17:37:38.396711332 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.396711332 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned long a = 0UL;
unsigned long b = 1UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((unsigned int)(a == b) != 0U) { zext.bc--- /dev/fd/63 2022-10-03 17:37:38.492710704 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.492710704 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
-unsigned char a = (unsigned char)1U;
-unsigned int main() {
+int main();
+char a = (unsigned char)1U;
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; byval_struct.bc--- /dev/fd/63 2022-10-03 17:37:38.544710363 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.544710363 +0000
@@ -5,20 +5,20 @@
unsigned long field3;
};
unsigned long get_3x(struct struct_foo arg0);
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "1\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[2] = "3\000";
-unsigned char _str_3[2] = "4\000";
-unsigned char _str_4[11] = "%lld %lld\n\000";
+char _str[2] = "1\000";
+char _str_1[2] = "2\000";
+char _str_2[2] = "3\000";
+char _str_3[2] = "4\000";
+char _str_4[11] = "%lld %lld\n\000";
unsigned long get_3x(struct struct_foo arg0) {
void *arg0_ptr = &arg0;
((struct struct_foo *)arg0_ptr)->field0 = ((struct struct_foo *)arg0_ptr)->field0 * 3UL;
return ((struct struct_foo *)arg0_ptr)->field0;
}
-unsigned int main() {
+int main() {
struct struct_foo var0;
unsigned long var1;
unsigned int call2; func_cond_two_arg.bc--- /dev/fd/63 2022-10-03 17:37:38.600709996 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.600709996 +0000
@@ -1,5 +1,5 @@
unsigned int f(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f(unsigned int arg0, unsigned int arg1) {
@@ -9,7 +9,7 @@
var1 = arg1;
return (unsigned int)((int)var0 < (int)var1);
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; inttoptr.bc--- /dev/fd/63 2022-10-03 17:37:38.704709316 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.704709316 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
var0 = 0U; assert.bc--- /dev/fd/63 2022-10-03 17:37:38.800708688 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.800708688 +0000
@@ -1,12 +1,12 @@
-unsigned int main();
+int main();
void __assert_fail(void *arg0, void *arg1, unsigned int arg2, void *arg3);
unsigned long a = 1UL;
-unsigned char _str[6] = "a % 3\000";
-unsigned char _str_1[9] = "assert.c\000";
-unsigned char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
-unsigned char _str_2[6] = "a % 7\000";
-unsigned char _str_3[7] = "a % 15\000";
-unsigned int main() {
+char _str[6] = "a % 3\000";
+char _str_1[9] = "assert.c\000";
+char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
+char _str_2[6] = "a % 7\000";
+char _str_3[7] = "a % 15\000";
+int main() {
unsigned int var0;
var0 = 0U;
if (a % 3UL == 0UL) { loop.bc--- /dev/fd/63 2022-10-03 17:37:38.976707536 +0000
+++ /dev/fd/62 2022-10-03 17:37:38.976707536 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[19] = "Variable at %d is \000";
-unsigned char _str_1[7] = "even.\n\000";
-unsigned char _str_2[6] = "odd.\n\000";
-unsigned int main() {
+char _str[19] = "Variable at %d is \000";
+char _str_1[7] = "even.\n\000";
+char _str_2[6] = "odd.\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; switch.bc--- /dev/fd/63 2022-10-03 17:37:39.184706186 +0000
+++ /dev/fd/62 2022-10-03 17:37:39.184706186 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 12U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; template_parameter_pack.bc--- /dev/fd/63 2022-10-03 17:37:39.292705487 +0000
+++ /dev/fd/62 2022-10-03 17:37:39.292705487 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int _Z3sumIiJiiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4);
unsigned int _Z3sumIiJiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3);
unsigned int _Z3sumIiJiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2);
unsigned int _Z3sumIiET_S0_S0_(unsigned int arg0, unsigned int arg1);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int call0;
call0 = _Z3sumIiJiiiiEET_S0_DpT0_(1U, 2U, 3U, 4U, 5U);
printf("%d\n", call0); byval_tail_gep.llbyval_tail_nogep.ll |
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3176241907 fizzbuzz.bc--- /dev/fd/63 2022-10-03 17:48:43.443807010 +0000
+++ /dev/fd/62 2022-10-03 17:48:43.443807010 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[10] = "fizzbuzz\n\000";
-unsigned char _str_1[6] = "fizz\n\000";
-unsigned char _str_2[6] = "buzz\n\000";
-unsigned char _str_3[4] = "%d\n\000";
-unsigned int main() {
+char _str[10] = "fizzbuzz\n\000";
+char _str_1[6] = "fizz\n\000";
+char _str_2[6] = "buzz\n\000";
+char _str_3[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; typedefs_of_typedefs.bc--- /dev/fd/63 2022-10-03 17:48:44.267791475 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.267791475 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[11] = "a=[%d %d]\n\000";
-unsigned char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
+char _str[11] = "a=[%d %d]\n\000";
+char _str_1[29] = "array=[%lld %lld %lld %lld]\n\000";
unsigned long array[4] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var1;
__attribute__((__vector_size__(2 * sizeof(unsigned long)))) unsigned long var2; switch_loop.bc--- /dev/fd/63 2022-10-03 17:48:44.327790347 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.327790347 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; func_cond_zero_arg.bc--- /dev/fd/63 2022-10-03 17:48:44.555786064 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.555786064 +0000
@@ -1,11 +1,11 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; fcmp.bc--- /dev/fd/63 2022-10-03 17:48:44.671783884 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.671783884 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
float atof(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "3\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[19] = "%d %d %d %d %d %d\n\000";
-unsigned int main() {
+char _str[2] = "3\000";
+char _str_1[2] = "2\000";
+char _str_2[19] = "%d %d %d %d %d %d\n\000";
+int main() {
float var0;
float var1;
float var2; conflicting_names.bc--- /dev/fd/63 2022-10-03 17:48:44.727782832 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.727782832 +0000
@@ -1,6 +1,6 @@
unsigned int foo();
unsigned int bar();
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int foo() {
unsigned int var0;
@@ -12,7 +12,7 @@
var0 = 1U;
return var0;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
void *var2; struct.bc--- /dev/fd/63 2022-10-03 17:48:44.895779675 +0000
+++ /dev/fd/62 2022-10-03 17:48:44.895779675 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (a.field0 == 0U) { issue_183_literal_structs.bc--- /dev/fd/63 2022-10-03 17:48:45.011777495 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.011777495 +0000
@@ -11,9 +11,9 @@
struct union_anon field2;
struct union_anon_0 field3;
};
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
+char _str[4] = "%d\n\000";
struct literal_struct_0 {
unsigned long field0;
unsigned long field1;
@@ -26,7 +26,7 @@
((struct literal_struct_0 *)val1)->field1 = arg1;
return *(unsigned int *)(&var0.field3);
}
-unsigned int main() {
+int main() {
struct struct_foo_t var0;
void *val1;
unsigned int call2; issue_127_uint128_t_lit.bc--- /dev/fd/63 2022-10-03 17:48:45.071776373 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.071776373 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned __int128 x = (unsigned __int128)3735928559ULL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned char val1;
var0 = 0U; global_using_function_decl.bc--- /dev/fd/63 2022-10-03 17:48:45.127775326 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.127775326 +0000
@@ -1,12 +1,12 @@
void some_func(unsigned int arg0);
-unsigned int main();
+int main();
void *afunc_pointer = &some_func;
void some_func(unsigned int arg0) {
unsigned int var0;
var0 = arg0;
return;
}
-unsigned int main() {
+int main() {
((void (*)(unsigned int))afunc_pointer)(0U);
return 0U;
} short.bc--- /dev/fd/63 2022-10-03 17:48:45.187774204 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.187774204 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned short a = (unsigned short)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned short var1;
var0 = 0U; init_list.bc--- /dev/fd/63 2022-10-03 17:48:45.243773157 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.243773157 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[5] = {0U, 1U, 2U, 3U, 4U};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return a[1UL]; reg_test_structure_fields.bc--- /dev/fd/63 2022-10-03 17:48:45.295772185 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.295772185 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct_a {
unsigned int field0;
};
struct struct_b {
struct struct_a field0;
};
-unsigned int main() {
+int main() {
struct struct_b var0;
return 0U;
} ret0.bc--- /dev/fd/63 2022-10-03 17:48:45.351771138 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.351771138 +0000
@@ -1,9 +1,9 @@
unsigned int f();
-unsigned int main();
+int main();
unsigned int f() {
return 1U;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; goto_loop.bc--- /dev/fd/63 2022-10-03 17:48:45.407770090 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.407770090 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; trunc.bc--- /dev/fd/63 2022-10-03 17:48:45.655765453 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.655765453 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 18446744073709551615UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; bitops.bc--- /dev/fd/63 2022-10-03 17:48:45.711764406 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.711764406 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int a = 255U;
unsigned int b = 7U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; cast.bc--- /dev/fd/63 2022-10-03 17:48:45.879761264 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.879761264 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)(&a); nullptr.bc--- /dev/fd/63 2022-10-03 17:48:45.935760217 +0000
+++ /dev/fd/62 2022-10-03 17:48:45.935760217 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
void *ptr = (void *)0U;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (ptr != (void *)0U) { nested_struct.bc--- /dev/fd/63 2022-10-03 17:48:46.047758127 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.047758127 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[4] = "Bob\000";
+char _str[4] = "Bob\000";
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -15,8 +15,8 @@
struct struct__person field2;
};
struct struct__record r1 = {14U, {33U, 42U}, {"Bob", (unsigned char)66U}};
-unsigned char _str_1[9] = "Name: %s\000";
-unsigned int main() {
+char _str_1[9] = "Name: %s\000";
+int main() {
unsigned int var0;
var0 = 0U;
printf("Name: %s", r1.field2.field0); array_swap.bc--- /dev/fd/63 2022-10-03 17:48:46.099757160 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.099757160 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a[2] = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; bitmask.bc--- /dev/fd/63 2022-10-03 17:48:46.151756192 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.151756192 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 43981UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((a & 4080UL) >> 4UL != 188UL) { binops.bc--- /dev/fd/63 2022-10-03 17:48:46.267754032 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.267754032 +0000
@@ -1,5 +1,5 @@
unsigned int target(unsigned int arg0);
-unsigned int main();
+int main();
unsigned int target(unsigned int arg0) {
unsigned int var0;
unsigned int var1;
@@ -22,7 +22,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; float.bc--- /dev/fd/63 2022-10-03 17:48:46.551748748 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.551748748 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
float f = 3.1400001F;
-unsigned int main() {
+int main() {
unsigned int var0;
double var1;
double var2; nested_while.bc--- /dev/fd/63 2022-10-03 17:48:46.659746738 +0000
+++ /dev/fd/62 2022-10-03 17:48:46.659746738 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "5\000";
-unsigned char _str_1[13] = "loop1 x: %d\n\000";
-unsigned char _str_2[13] = "loop2 x: %d\n\000";
-unsigned int main() {
+char _str[2] = "5\000";
+char _str_1[13] = "loop1 x: %d\n\000";
+char _str_2[13] = "loop2 x: %d\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
unsigned int call2; zeroinit.bc--- /dev/fd/63 2022-10-03 17:48:47.031739818 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.031739818 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__person {
void *field0;
- unsigned char field1;
+ char field1;
};
struct struct__record {
unsigned int field0;
@@ -14,7 +14,7 @@
};
struct struct__record r1 = {};
unsigned long a1[256] = {};
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if (r1.field1.field0 == 0U) { funcptr.bc--- /dev/fd/63 2022-10-03 17:48:47.195736781 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.199736706 +0000
@@ -1,6 +1,6 @@
unsigned int add(unsigned int arg0, unsigned int arg1);
unsigned int sub(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int add(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
@@ -16,7 +16,7 @@
var1 = arg1;
return var0 - var1;
}
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
unsigned int call2; struct_swap.bc--- /dev/fd/63 2022-10-03 17:48:47.311734632 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.311734632 +0000
@@ -1,10 +1,10 @@
-unsigned int main();
+int main();
struct struct__pair {
unsigned int field0;
unsigned int field1;
};
struct struct__pair a = {0U, 42U};
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; branch.bc--- /dev/fd/63 2022-10-03 17:48:47.367733595 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.367733595 +0000
@@ -1,13 +1,13 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 0U;
unsigned int c = 1U;
-unsigned char _str[39] = "Global variable 'a' of value %u is at \000";
-unsigned char _str_1[6] = "even \000";
-unsigned char _str_2[5] = "odd \000";
-unsigned char _str_3[39] = "Global variable 'c' of value %u is at \000";
-unsigned char _str_4[10] = "address.\n\000";
-unsigned int main() {
+char _str[39] = "Global variable 'a' of value %u is at \000";
+char _str_1[6] = "even \000";
+char _str_2[5] = "odd \000";
+char _str_3[39] = "Global variable 'c' of value %u is at \000";
+char _str_4[10] = "address.\n\000";
+int main() {
unsigned int var0;
unsigned long var1;
unsigned long var2; vectors.bc--- /dev/fd/63 2022-10-03 17:48:47.699727445 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.699727445 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[17] = "a=[%d %d %d %d]\n\000";
-unsigned int main() {
+char _str[17] = "a=[%d %d %d %d]\n\000";
+int main() {
unsigned int var0;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var1;
__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int var2; issue_4.bc--- /dev/fd/63 2022-10-03 17:48:47.755726409 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.755726409 +0000
@@ -1,5 +1,5 @@
unsigned int foo(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int foo(unsigned int arg0, unsigned int arg1) {
unsigned int var0;
unsigned int var1;
@@ -17,7 +17,7 @@
}
return var2;
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; conflicting_global.bc--- /dev/fd/63 2022-10-03 17:48:47.927723223 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.927723223 +0000
@@ -1,8 +1,8 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int a = 3U;
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int var0;
var0 = 4U;
printf("%d\n", var0); issue_123_uint128_t.bc--- /dev/fd/63 2022-10-03 17:48:47.983722186 +0000
+++ /dev/fd/62 2022-10-03 17:48:47.983722186 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long x = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned __int128 var1;
var0 = 0U; fizzbuzz_stateful.bc--- /dev/fd/63 2022-10-03 17:48:48.035721225 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.035721225 +0000
@@ -1,11 +1,11 @@
void fizzbuzz();
unsigned int printf(void *arg0, ...);
-unsigned int main();
+int main();
unsigned int i = 0U;
-unsigned char _str[5] = "fizz\000";
-unsigned char _str_1[5] = "buzz\000";
-unsigned char _str_2[3] = "%d\000";
-unsigned char _str_3[2] = "\n\000";
+char _str[5] = "fizz\000";
+char _str_1[5] = "buzz\000";
+char _str_2[3] = "%d\000";
+char _str_3[2] = "\n\000";
void fizzbuzz() {
unsigned int var0;
var0 = i;
@@ -24,7 +24,7 @@
i = var0;
return;
}
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
i = 1U; issue_94_strncmp.bc--- /dev/fd/63 2022-10-03 17:48:48.435713851 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.435713851 +0000
@@ -1,16 +1,16 @@
-unsigned int main();
+int main();
void *strcpy(void *arg0, void *arg1);
unsigned int strncmp(void *arg0, void *arg1, unsigned long arg2);
unsigned int printf(void *arg0, ...);
-unsigned char _str[6] = "hello\000";
-unsigned char _str_1[12] = "helLO WORLD\000";
-unsigned char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
-unsigned char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
-unsigned char _str_4[41] = "Both the strings str1 and str2 are equal\000";
-unsigned int main() {
+char _str[6] = "hello\000";
+char _str_1[12] = "helLO WORLD\000";
+char _str_2[70] = "ASCII value of first unmatched character of str1 is greater than str2\000";
+char _str_3[67] = "ASCII value of first unmatched character of str1 is less than str2\000";
+char _str_4[41] = "Both the strings str1 and str2 are equal\000";
+int main() {
unsigned int var0;
- unsigned char var1[20];
- unsigned char var2[20];
+ char var1[20];
+ char var2[20];
unsigned int call3;
unsigned int call4;
var0 = 0U; bool.bc--- /dev/fd/63 2022-10-03 17:48:48.611710606 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.611710606 +0000
@@ -1,7 +1,7 @@
-unsigned int main();
+int main();
unsigned long a = 0UL;
unsigned long b = 1UL;
-unsigned int main() {
+int main() {
unsigned int var0;
var0 = 0U;
if ((unsigned int)(a == b) != 0U) { zext.bc--- /dev/fd/63 2022-10-03 17:48:48.719708615 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.719708615 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
-unsigned char a = (unsigned char)1U;
-unsigned int main() {
+int main();
+char a = (unsigned char)1U;
+int main() {
unsigned int var0;
var0 = 0U;
return (unsigned int)a; byval_struct.bc--- /dev/fd/63 2022-10-03 17:48:48.771707657 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.771707657 +0000
@@ -5,20 +5,20 @@
unsigned long field3;
};
unsigned long get_3x(struct struct_foo arg0);
-unsigned int main();
+int main();
unsigned int atoi(void *arg0);
unsigned int printf(void *arg0, ...);
-unsigned char _str[2] = "1\000";
-unsigned char _str_1[2] = "2\000";
-unsigned char _str_2[2] = "3\000";
-unsigned char _str_3[2] = "4\000";
-unsigned char _str_4[11] = "%lld %lld\n\000";
+char _str[2] = "1\000";
+char _str_1[2] = "2\000";
+char _str_2[2] = "3\000";
+char _str_3[2] = "4\000";
+char _str_4[11] = "%lld %lld\n\000";
unsigned long get_3x(struct struct_foo arg0) {
void *arg0_ptr = &arg0;
((struct struct_foo *)arg0_ptr)->field0 = ((struct struct_foo *)arg0_ptr)->field0 * 3UL;
return ((struct struct_foo *)arg0_ptr)->field0;
}
-unsigned int main() {
+int main() {
struct struct_foo var0;
unsigned long var1;
unsigned int call2; func_cond_two_arg.bc--- /dev/fd/63 2022-10-03 17:48:48.831706551 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.831706551 +0000
@@ -1,5 +1,5 @@
unsigned int f(unsigned int arg0, unsigned int arg1);
-unsigned int main();
+int main();
unsigned int x = 0U;
unsigned int y = 1U;
unsigned int f(unsigned int arg0, unsigned int arg1) {
@@ -9,7 +9,7 @@
var1 = arg1;
return (unsigned int)((int)var0 < (int)var1);
}
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int call1;
var0 = 0U; inttoptr.bc--- /dev/fd/63 2022-10-03 17:48:48.951704339 +0000
+++ /dev/fd/62 2022-10-03 17:48:48.951704339 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned long a = 3735928559UL;
-unsigned int main() {
+int main() {
unsigned int var0;
void *var1;
var0 = 0U; assert.bc--- /dev/fd/63 2022-10-03 17:48:49.075702059 +0000
+++ /dev/fd/62 2022-10-03 17:48:49.075702059 +0000
@@ -1,12 +1,12 @@
-unsigned int main();
+int main();
void __assert_fail(void *arg0, void *arg1, unsigned int arg2, void *arg3);
unsigned long a = 1UL;
-unsigned char _str[6] = "a % 3\000";
-unsigned char _str_1[9] = "assert.c\000";
-unsigned char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
-unsigned char _str_2[6] = "a % 7\000";
-unsigned char _str_3[7] = "a % 15\000";
-unsigned int main() {
+char _str[6] = "a % 3\000";
+char _str_1[9] = "assert.c\000";
+char __PRETTY_FUNCTION___main[15] = "int main(void)\000";
+char _str_2[6] = "a % 7\000";
+char _str_3[7] = "a % 15\000";
+int main() {
unsigned int var0;
var0 = 0U;
if (a % 3UL == 0UL) { loop.bc--- /dev/fd/63 2022-10-03 17:48:49.311697729 +0000
+++ /dev/fd/62 2022-10-03 17:48:49.311697729 +0000
@@ -1,9 +1,9 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
-unsigned char _str[19] = "Variable at %d is \000";
-unsigned char _str_1[7] = "even.\n\000";
-unsigned char _str_2[6] = "odd.\n\000";
-unsigned int main() {
+char _str[19] = "Variable at %d is \000";
+char _str_1[7] = "even.\n\000";
+char _str_2[6] = "odd.\n\000";
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; switch.bc--- /dev/fd/63 2022-10-03 17:48:49.575692885 +0000
+++ /dev/fd/62 2022-10-03 17:48:49.575692885 +0000
@@ -1,6 +1,6 @@
-unsigned int main();
+int main();
unsigned int a = 12U;
-unsigned int main() {
+int main() {
unsigned int var0;
unsigned int var1;
var0 = 0U; template_parameter_pack.bc--- /dev/fd/63 2022-10-03 17:48:49.707690463 +0000
+++ /dev/fd/62 2022-10-03 17:48:49.707690463 +0000
@@ -1,11 +1,11 @@
-unsigned int main();
+int main();
unsigned int printf(void *arg0, ...);
unsigned int _Z3sumIiJiiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3, unsigned int arg4);
unsigned int _Z3sumIiJiiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2, unsigned int arg3);
unsigned int _Z3sumIiJiiEET_S0_DpT0_(unsigned int arg0, unsigned int arg1, unsigned int arg2);
unsigned int _Z3sumIiET_S0_S0_(unsigned int arg0, unsigned int arg1);
-unsigned char _str[4] = "%d\n\000";
-unsigned int main() {
+char _str[4] = "%d\n\000";
+int main() {
unsigned int call0;
call0 = _Z3sumIiJiiiiEET_S0_DpT0_(1U, 2U, 3U, 4U, 5U);
printf("%d\n", call0); byval_tail_gep.llbyval_tail_nogep.ll |
7fd369c
to
40f3c5f
Compare
@Ninja3047 Can you rebase this on master? |
See the diff generated by this PR for the tests here: https://github.com/lifting-bits/rellic/actions/runs/3319674935 fizzbuzz.bc--- /dev/fd/63 2022-10-25 09:22:07.155914811 +0000
+++ /dev/fd/62 2022-10-25 09:22:07.155914811 +0000
@@ -11,7 +11,7 @@
var1 = 0U;
while ((int)var1 < 30)
{
- if ((int)var1 % 3 != 0U || !((int)var1 % 5 == 0U || (int)var1 % 3 != 0U)) {
+ if (!((int)var1 % 3 != 0U || (int)var1 % 5 == 0U) || (int)var1 % 3 != 0U) {
if ((int)var1 % 3 != 0U) {
if ((int)var1 % 5 != 0U) {
printf("%d\n", var1); typedefs_of_typedefs.bcswitch_loop.bcfunc_cond_zero_arg.bcfcmp.bcconflicting_names.bcstruct.bcissue_183_literal_structs.bczeroinit.bcissue_127_uint128_t_lit.bcstruct_swap.bcglobal_using_function_decl.bcinit_list.bcreg_test_structure_fields.bcret0.bcgoto_loop.bcbool.bcbitops.bccast.bcnullptr.bcnested_struct.bcarray_swap.bcbinops.bcbitmask.bcloop.bcfloat.bcvectors.bcfuncptr.bcinttoptr.bcshort.bctrunc.bcissue_4.bcconflicting_global.bcissue_123_uint128_t.bcfizzbuzz_stateful.bcissue_94_strncmp.bczext.bcbyval_struct.bcnested_while.bc--- /dev/fd/63 2022-10-25 09:22:12.968018632 +0000
+++ /dev/fd/62 2022-10-25 09:22:12.968018632 +0000
@@ -18,14 +18,14 @@
printf("loop1 x: %d\n", var1);
}
}
- if ((int)var1 >= 20 || (int)var1 <= 10) {
+ if ((int)var1 <= 10 || (int)var1 >= 20) {
while ((int)var1 < 20)
{
var1 = var1 + 1U;
printf("loop2 x: %d\n", var1);
}
}
- if ((int)var1 >= 20 && ((int)var1 >= 20 || (int)var1 <= 10)) {
+ if (((int)var1 <= 10 || (int)var1 >= 20) && (int)var1 >= 20) {
return var0;
}
} func_cond_two_arg.bcassert.bcswitch.bcbranch.bctemplate_parameter_pack.bcbyval_tail_nogep.llbyval_tail_gep.ll |
Based on #304