View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0029128 | FPC | Compiler | public | 2015-12-02 15:14 | 2021-02-21 22:54 |
Reporter | Bernd | Assigned To | Jeppe Johansen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | AVR | OS | embedded | ||
Product Version | 3.1.1 | ||||
Target Version | 3.1.1 | ||||
Summary | 0029128: AVR, problem with mod/div operators | ||||
Description | The attached program executes line 13 (CurrentDigit:= ...) only one time. The second time, the cpu (ATMega128) remains/crashes somwhere in the rtl. Unfortunately, I have no debugger to give more details. Compiler/rtl built with fpc 3.0.0 make crosszipinstall CPU_TARGET=avr OS_TARGET=embedded SUBARCH=avr51 program compiled with: avr-embedded-fpc -Wpatmega128 -O2 -Cpavr51 -al test.pas | ||||
Tags | AVR | ||||
Fixed in Revision | 32589 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
test.pas (496 bytes)
Program Test; {$mode objfpc}{$H-} procedure Nirvana; var Value, ModVar, DivVar, CurrentDigit: Integer; begin Value:= 5; ModVar:= 10000; DivVar:= 1000; repeat // LED_On; CurrentDigit:= (Value mod ModVar) div DivVar; // wont't reach this point a second time // LED_Off; ModVar:= ModVar div 10; DivVar:= DivVar div 10; until ModVar = 1; end; begin // InitLED; Nirvana; repeat until FALSE; end. |
|
Can you retest with the latest trunk? |
|
it is working now with revision 32605. Thank you. |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-12-02 15:14 | Bernd | New Issue | |
2015-12-02 15:14 | Bernd | File Added: test.pas | |
2015-12-03 13:54 | Simon Ameis | Tag Attached: AVR | |
2015-12-05 23:58 | Jeppe Johansen | Note Added: 0087807 | |
2015-12-07 10:28 | Bernd | Note Added: 0087831 | |
2015-12-07 20:43 | Jeppe Johansen | Fixed in Revision | => 32589 |
2015-12-07 20:43 | Jeppe Johansen | Status | new => resolved |
2015-12-07 20:43 | Jeppe Johansen | Resolution | open => fixed |
2015-12-07 20:43 | Jeppe Johansen | Assigned To | => Jeppe Johansen |
2015-12-07 20:43 | Jeppe Johansen | Target Version | => 3.1.1 |