Compiler generates invalid assembly with "bad register name"
While working on the statistics package last night, my automated build found a regression in GHC 7.2.1's code generator:
[17 of 23] Compiling Statistics.Distribution.Poisson ( Statistics/Distribution/Poisson.hs, dist/build/Statistics/Distribution/Poisson.o )
/tmp/ghc22105_0/ghc22105_0.s: Assembler messages:
/tmp/ghc22105_0/ghc22105_0.s:5520:0:
Error: bad register name `%st(-16)'
As you can see from the build output, this code compiles fine with 6.12 and 7.0. These are all 32-bit versions of GHC on a 32-bit Fedora 15 system. This code compiles without a problem on my 64-bit Mac running a 64-bit 7.2.1 release.
I bisected my changes in the statistics tree, and found that it's at this exact change that 7.2.1 transitions from generating good code to bad.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.2.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |