Code optimized incorrectly
Original Reporter info from Mantis: m_burkhard@gmx.ch
-
Reporter name:
Original Reporter info from Mantis: m_burkhard@gmx.ch
- Reporter name:
Description:
With {O-} everything io. , with {
O+} "val" is implemented. "val" changes constantly, but there is no change in shiftOut595.
Steps to reproduce:
[code]{$O+}
procedure shiftOut595(val: byte);
var
i: byte;
begin
for i := 7 downto 0 do begin
if (val and (1 shl i)) <> 0 then begin
PORTA := PORTA or (1 shl dataOutPin);
end else begin
PORTA := PORTA and not (1 shl dataOutPin);
end;
PORTA := PORTA or (1 shl clockPin);
PORTA := PORTA and not (1 shl clockPin);
end;
end; [/code]
Additional information:
Attached the whole project.
Mantis conversion info:
- Mantis ID: 32730
- OS: Linux Mint 64Bit
- OS Build: 18.2
- Build: 3.0.4rc1
- Platform: AVR25 (ATiny44A)
- Version: 3.1.1