Add -DDEBUG to enable assertions in util/ego
Our build enables assertions in some other ACK tools (like assemblers and LLgen), but disabled them in ego until now. Bug #203 becomes a failed assertion in ego's SR phase: sr: util/ego/sr/sr_reduce.c:483: fix_header: Assertion `INSTR(e) == ps_end' failed. Comment out 2 assertions in util/ego/share, because they fail on systems with 4-byte int, 8-byte long.
This commit is contained in:
parent
0bcbaf848a
commit
fc1476c88b
|
@ -9,7 +9,7 @@ local function build_ego(name)
|
||||||
"h+emheaders",
|
"h+emheaders",
|
||||||
},
|
},
|
||||||
vars = {
|
vars = {
|
||||||
["+cflags"] = {"-DVERBOSE", "-DNOTCOMPACT"}
|
["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,6 +55,6 @@ clibrary {
|
||||||
"modules/src/em_data+lib",
|
"modules/src/em_data+lib",
|
||||||
},
|
},
|
||||||
vars = {
|
vars = {
|
||||||
["+cflags"] = {"-DVERBOSE", "-DNOTCOMPACT"}
|
["+cflags"] = {"-DDEBUG", "-DVERBOSE", "-DNOTCOMPACT"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,8 @@ STATIC int getint(void)
|
||||||
if (sizeof(int) == sizeof(short)) {
|
if (sizeof(int) == sizeof(short)) {
|
||||||
return getshort();
|
return getshort();
|
||||||
} else {
|
} else {
|
||||||
assert (sizeof(int) == sizeof(offset));
|
/* Fails with 4-byte int, 8-byte long:
|
||||||
|
* assert (sizeof(int) == sizeof(offset)); */
|
||||||
return getoff();
|
return getoff();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,8 @@ STATIC void outint(int i)
|
||||||
if (sizeof(int) == sizeof(short)) {
|
if (sizeof(int) == sizeof(short)) {
|
||||||
outshort(i);
|
outshort(i);
|
||||||
} else {
|
} else {
|
||||||
assert (sizeof(int) == sizeof(offset));
|
/* Fails with 4-byte int, 8-byte long:
|
||||||
|
* assert (sizeof(int) == sizeof(offset)); */
|
||||||
outoff((offset) i);
|
outoff((offset) i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue