[comp.bugs.4bsd] 4.3bsd Pascal compiler bug

kim@enea.UUCP (Kim Walden) (12/03/86)

The following simple schoolbook example compiles and runs
with no problems using 'pc' on 4.2bsd, but when I try it on 4.3bsd,

	pc -l foo.p

gives the following result:

-------------------------------------------------------------------

Berkeley Pascal PC -- Version 3.1 (9/7/85)

Tue Dec  2 13:26 1986  foo.p

     1  program FOO(input,output);

     3  type colour = (black,white);
     4  var conv: array[colour] of array[1..5] of char;

     6  begin
     7  	conv[black] := 'white';
     8  	conv[white] := 'black';
     9  	writeln('conv[black] is ', conv[black]);
    10  	writeln('conv[white] is ', conv[white]);
    11  end.
E 7 - Too few subscripts (1 given, 2 required)
E 8 - Type clash: scalar is incompatible with integer
  ... Array index type incompatible with declared index type
  ... Error occurred on index number 2
  ... Error occurred on qualification of conv
E 10 - Too few subscripts (1 given, 2 required)
In program FOO:
  w - variable conv is used but never set

-------------------------------------------------------------------

Seems to be a bug here -- has anybody seen it before?

It has the unfortunate consequence that I cannot compile the WICOMO
implementation of Barry Boehms COCOMO cost estimation model anymore.

Strange that it should have passed unnoticed, since this type of
construction must be fairly common.

Kim Walden, ENEA DATA Sweden

UUCP:	{seismo,mcvax}!enea!kim
ARPA:	kim%enea.uucp@seismo.CSS.GOV