Compiler generates incorrect (or no) code for function call
Original Reporter info from Mantis: ernomalley
-
Reporter name: Ern O'Malley
Original Reporter info from Mantis: ernomalley
- Reporter name: Ern O'Malley
Description:
(* simple recursive routine to count characters in a file *)
program showbug ;
function countchars : INTEGER ;
var
donewith : CHAR ;
begin
if EOF then
countchars := 0
else
begin
read ( donewith ) ; countchars := 1 + countchars
end
end ;
begin
writeln ( 1 + countchars )
end .
Mantis conversion info:
- Mantis ID: 22344
- Fixed in version: 3.0.0
- Fixed in revision: 21817 (#1b3b097f)