Incorrect offsets for array size indexing
There are several cases in the array code generation where a byte offset is used when a word offset is needed. For example (context):
emitPrimOp dflags [res] SizeofSmallArrayOp [arg] =
emit $ mkAssign (CmmLocal res)
(cmmLoadIndexW dflags arg
(fixedHdrSizeW dflags + oFFSET_StgSmallMutArrPtrs_ptrs dflags) (bWord dflags))
This only works because oFFSET_StgSmallMutArrPtrs_ptrs dflags
is zero.
I don't have time to fix this now, but I'm reporting it so it isn't forgotten.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler (CodeGen) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonmar |
Operating system | |
Architecture |