Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lcc-win32 bug report

19 views
Skip to first unread message

Colin Barker

unread,
Apr 16, 2009, 9:36:33 AM4/16/09
to
When trying to compile the following:

#include <stdio.h>
#include <stdlib.h>

#define MAX 1000

int main(void)
{
long x, n=1, best=0, cnt1, cnt2=0;

for (;;) {
cnt1=0;
for (x=n+1; x<=((long long)n*x)/(x-n); x++) {
if (((long long)n*x)%(x-n) == 0) {
cnt1++;
}
}
if (cnt1 > cnt2) {
cnt2 = cnt1;
best = n;
if (cnt2 > MAX) {
(void)printf("n=%ld\n", n);
break;
}
}
n++;
}

return EXIT_SUCCESS;
}

I get:

Wedit output window build: Thu Apr 16 15:28:10 2009
LEL(INDIRL(ADDRLP(23)), DIVL(MULL(CVIL(INDIRI(VREGP(24))),
INDIRL(ADDRLP(23))), CVIL(SUBI(INDIRI(VREGP(22)), INDIRI(VREGP(24))))))Error
c:\users\colin\mydata\tc\compilererror.c: 12
+ compiler error in _kids--
Bad rule number 0
Error c:\users\colin\mydata\tc\compilererror.c 12 Compiler error (trap).
Stopping compilation
Compilation + link time:0.0 sec, Return code: 1
--
Colin

jacob navia

unread,
Apr 16, 2009, 3:04:44 PM4/16/09
to
A new version is uploaded. From the readme file:

Apr 16: The expression:
int main(void) { long x=2, n=1, cnt1;
cnt1 = x<=((long long)n*x)/(x-n);
}
provoked a compile time error. Fixed. Thanks to Colin Barker for
reporting this bug.

0 new messages