panic "hscCmmFile: no_mod" with `-v2 and above
Initailly found this on powerpc when debugging #11773, but it also happens on x86_64. The command line:
inplace/bin/ghc-stage1 -static -H64m -O0 -Wall -v2 -Iincludes \
-Iincludes/dist -Iincludes/dist-derivedconstants/header \
-Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build \
-DCOMPILING_RTS -this-unit-id rts -optc-DNOSMP -dcmm-lint -i -irts \
-irts/dist/build -irts/dist/build/autogen -Irts/dist/build \
-Irts/dist/build/autogen -O2 -Wnoncanonical-monad-instances -c\
rts/StgStartup.cmm -o rts/dist/build/StgStartup.o
panics with a message:
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.1.20160402 for powerpc-unknown-linux):
hscCmmFile: no_mod
The only thing that was added to the command line that is different from the normal build command is the -v2
.
This is caused by the code (in compiler/main/HscMain.hs):
no_mod = panic "hscCmmFile: no_mod"
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |