Hi,
Now that gpc runs, I compiled and tested the bigsetdemo sample program that comes with gpc. I am concerned with that since the SUN Pascal code I must convert to GNU Pascal uses some big sets. The program works, but outputs all the values I enter minus 1. I don't see anything strange in the source so, is there a bug in the 'set' mechanism?
Here is a sreenshot of the bigsetdemo program:
<Sigourney> bigsetsdemo Enter some numbers between 1 and 100000 (one or several per line). Enter an empty line when finished. 2 56 21
You entered the following numbers: 1 20 55 <Sigourney> bigsetsdemo Enter some numbers between 1 and 100000 (one or several per line). Enter an empty line when finished. 1 8352 76
You entered the following numbers: 75 8351 <Sigourney>
Pascal Viandier
pascal@accovia.com
Pascal Viandier wrote:
Hi,
Now that gpc runs, I compiled and tested the bigsetdemo sample program that comes with gpc. I am concerned with that since the SUN Pascal code I must convert to GNU Pascal uses some big sets. The program works, but outputs all the values I enter minus 1. I don't see anything strange in the source so, is there a bug in the 'set' mechanism?
Here is a sreenshot of the bigsetdemo program:
<Sigourney> bigsetsdemo Enter some numbers between 1 and 100000 (one or several per line). Enter an empty line when finished. 2 56 21
You entered the following numbers: 1 20 55
What you see is a bug, you should see just the numbers you have entered. The problem seem to be specific to sparc (or maybe even sparc solaris). I can not reproduce it on other machines (the demo for me works as expected). ATM I can not test the demo on sparc. Hopefully at the end of week I will be able to try it on sparc solaris.
What options did you give to gpc compiling `bigsetsdemo.pas'? You may try to run the gpc testsuite (the testsuite supposed to catch such problems). Also, you may try to give `-fno-range-checking' option (range checking is a new feature, on by default, turning it off would help to localize the problem).