Mail Archives: pgcc/1999/03/30/02:29:32
Hi,
There seems to be a problem with PGCC when used to compile the
chess-playing program KnightCap. When compiled with PGCC, KnightCap just
loops forever at line 267 of movement.c, with or without compiler
optimization flags. It's probably not a bug, but I really wouldn't know.
$ pgcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.91.60/specs
gcc version pgcc-2.91.60 19981201 (egcs-1.1.1 release)
KnightCap version: KnightCap-3.6.tar.gz
$(SRC)/movement.c:
Square p1, p2;
int s1, s2;
int dir, i;
uint64 mask;
...
for (i=0;i<8;i++) {
dir = NORTH_WEST;
p1 = A1 + i*EAST;
p2 = A1 + i*NORTH;
mask = 0;
267: for (s1=p1; s1>=p2; s1+=dir)
mask |= ((uint64)1<<s1);
for (s1=p1;s1>=p2;s1+=dir)
for (s2=p1;s2>=p2;s2+=dir)
if (s1 != s2) {
same_line_mask[s1][s2] = mask;
}
}
L L Richi Plana 8^) ,-,-. ,-,-. ,-,-. ,-,-. ,-
LL LL Systems Administrator / / \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL Mosaic Communications, Inc. \ \ / / \ \ / / \ \ / / \ \ / /
LLLLL mailto:richip AT mozcom DOT com `-'-' `-'-' `-'-' `-'-'
------------------------------------------------------------------------
P G P Key available at http://www2.mozcom.com/~richip/richip.asc
Tired of Spam? Join this CAUCE! http://www.cauce.org/
- Raw text -