It appears that some code in backend/utils/adt/int8.c tickles a compiler bug in SCO's UDK when it is compiled with optimazation turned on. The attached patch, which rewrites a for statement as a while statement corrects the problem.