Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!apollo!rehrauer From: rehrauer@apollo.HP.COM (Steve Rehrauer) Newsgroups: comp.sys.apollo Subject: Re: Bug in pas compiler Message-ID: <4d6aeb36.20b6d@apollo.HP.COM> Date: 15 Oct 90 19:34:00 GMT References: <9010151553.AB00336@apo.esiee.fr> Sender: root@apollo.HP.COM Reply-To: rehrauer@apollo.HP.COM (Steve Rehrauer) Organization: Hewlett-Packard Apollo Division - Chelmsford, MA Lines: 40 In article <9010151553.AB00336@apo.esiee.fr> bonnetf@apo.esiee.fr (bonnet-franck) writes: >We found a strange bug in pascal compiler (Pascal compiler 68K Rev 8.7(271)) >The source program follows : >----------------- CUT HERE ---------------------------- >program b(input, output); >var princ: integer; >procedure p(var s:integer); >begin > s := 1; > writeln(s); >end; > >begin >p(princ); >writeln(princ); >end. >----------------- CUT HERE ---------------------------- >The result follows : >bug.bin > 0 > 1 Sigh. You've uncovered a cute little hole in our Pascal. Do you really want to know why it fails? I thought not. :-) The semi-good news is that if you [a] compile at -opt 1, or [b] change your declarations from integer to integer32, things will work. The bad news is that I've verified that this bug is still in 8.8 Pascal, which is currently in advanced throes of Beta testing. The ugly news is that a fix for it won't get into the first release of 8.8. Sigh, if only you'dve noticed it a few weeks ago... I've logged it in our internal bug reports; I suggest you APR it as well, so you can track it. If we do a patch release of 8.8, the fix may get in that, especially if you really need it fixed and scream loudly enough. Apologies. -- "I feel lightheaded, Sam. I think my | (Steve) rehrauer@apollo.hp.com brain is out of air. But it's kind of | The Apollo Systems Division of a neat feeling..." -- Freelance Police | Hewlett-Packard