Case of Bug
Original Reporter info from Mantis: FPCCore
-
Reporter name: FPC core team
Original Reporter info from Mantis: FPCCore
- Reporter name: FPC core team
Description:
'case SomeVar of'
gives sometimes wrong result.
This error hapends only if :
- SomeVar is a enumurated type.
- 'a:=-1'.
because of this the compiler gives a warning
'values in Enumarates type have to be ascending..'
(This message apears because I think -1 is converted to unsigned integer)
- And the 'e,f' as case label must be given.
(The seccond must the 'succ' of the first)
In all other cases 'case' works fine.
In the example the assembler file produced contains:
cmpl $3,%eax
jb .L13
subl $1,%eax
jbe .l3
a 'subl $3,%eax' above the 'subl $1,%eax' is left out.
Additional information:
Reporter: Jeroen van Iddekinge
EMail: Iddekingej at lycos dot com
Mantis conversion info:
- Mantis ID: 3395
- OS: All
- Version: ?
- Fixed in version: 1.0.5