ref: 40c421cfdf64efb9b3bbfa0cd14a847193511480
parent: eb4c3147c3cb01832446677556b63accf57c2b9e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Jan 18 12:47:09 EST 2017
[cc1] Add aditional debug in fold.c
--- a/cc1/fold.c
+++ b/cc1/fold.c
@@ -194,6 +194,8 @@
default: return 0;
}
res->u.i = i;
+
+ DBG("FOLD %lld %d %lld = %lld", l, op, r, i);
return 1;
}
@@ -227,12 +229,15 @@
case ONE: i = l != r; goto sign;
default: return 0;
}
-
res->u.u = u & ones(res->type->size);
+
+ DBG("FOLD %llu %d %llu = %llu", l, op, r, i);
return 1;
sign:
res->u.i = i;
+
+ DBG("FOLD %llu %d %llu = %llu", l, op, r, i);
return 1;
}
@@ -480,14 +485,17 @@
}
free_right:
+ DBG("FOLD identity %d", op);
freetree(rp);
return lp;
free_left:
+ DBG("FOLD identity %d", op);
freetree(lp);
return rp;
change_to_comma:
+ DBG("FOLD identity %d", op);
*op = OCOMMA;
return NULL;
}
@@ -506,6 +514,7 @@
np = body->left;
freetree(body->right);
}
+ DBG("FOLD ternary");
freetree(cond);
free(body);
return np;