NCG: shortcutBranch doesn't handle loops properly
The following Cmm code causes GHC to go into an infinite loop when -O and -fasm are on.
foo {
L: goto L;
}
I do not know of any code that depends on this yet. I just tripped over it when writting tests for the CPS pass.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (NCG) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Multiple |
| Architecture |
Edited by Simon Marlow