View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0036242 | FPC | Compiler | public | 2019-11-01 17:17 | 2020-01-19 18:34 |
Reporter | Christo Crause | Assigned To | Florian | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.3.1 | ||||
Fixed in Version | 3.3.1 | ||||
Summary | 0036242: AVR - compiler gets stuck in trgobj.do_register_allocation | ||||
Description | When compiling the example below with -O2 the compiler gets stuck in trgobj.do_register_allocation. This is probably related to Florian's comment (https://bugs.freepascal.org/view.php?id=36236#c118946) about problems with the register allocator, AVR register orthogonality and spilling of registers. | ||||
Steps To Reproduce | Compile program below with following compiler arguments: ppcrosavr -Cpavr5 -Tembedded -Wpatmega328p -Pavr -XPavr- -O2 test.pp program test; function fpc_qword: qword; var n: boolean; bitpos: qword; begin fpc_qword := 0; bitpos := 0; for n := false to true do bitpos := bitpos + bitpos; end; begin end. | ||||
Tags | AVR | ||||
Fixed in Revision | 43983 | ||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
Actually, if you wait long enough (centuries :))?, you get an internalerror. I am not sure though why the register allocator does not find a solution in this case, as far as I can see, the non-orthogonal register set is not the problem. |
|
Note that a different user is experiencing a similar issue, refer to discussion on Lazarus forum: https://forum.lazarus.freepascal.org/index.php/topic,47649.0.html |
|
Actually, there was a bug which was solved by r43983 (sp being set as r13/r14 which nobody noticed so far), which caused this failure. |
|
Good catch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-11-01 17:17 | Christo Crause | New Issue | |
2019-11-01 17:18 | Christo Crause | Tag Attached: AVR | |
2019-11-01 20:18 | Florian | Note Added: 0118955 | |
2019-12-07 18:06 | Christo Crause | Note Added: 0119683 | |
2020-01-19 17:31 | Florian | Assigned To | => Florian |
2020-01-19 17:31 | Florian | Status | new => resolved |
2020-01-19 17:31 | Florian | Resolution | open => fixed |
2020-01-19 17:31 | Florian | Fixed in Version | => 3.3.1 |
2020-01-19 17:31 | Florian | Fixed in Revision | => 43983 |
2020-01-19 17:31 | Florian | FPCTarget | => - |
2020-01-19 17:31 | Florian | Note Added: 0120553 | |
2020-01-19 18:34 | Christo Crause | Status | resolved => closed |
2020-01-19 18:34 | Christo Crause | Note Added: 0120557 |