Bad code generation when assigning and copying bitpacked array of char-type.
Original Reporter info from Mantis: chastai
-
Reporter name: Christophe Staïesse
Original Reporter info from Mantis: chastai
- Reporter name: Christophe Staïesse
Description:
Hello,
It would seem that bitpacked arrays didn't say their last word :-)
The problem is that when assigning a string to a bitpacked array of char type elements (let's say a bitpacked array of #0..#127, that makes 7-bit by element), the string is getting copied literally as if the array was not bitpacked.
The bug occurs also the other way round: when assigning a bitpacked array of char-type to a string, the array is copied literally. This concerns also the Write standard procedure by example.
I've included a program to reproduce that bug.
Tested with FPC 2.6.0 and 2.7.1 under Linux x64.
Thank you.
Mantis conversion info:
- Mantis ID: 24013
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 23739 (#1244cdff)