GHC panics with "trivially colorable nodes didn't color!"
Steps to reproduce
In my apple repo, branch ghc-panic
or commit d3c512419f799cb32da8517eb4cf5fe070e9c139
:
cabal build apple-bench -w ghc-9.10
Then:
<no location info>: error:
panic! (the 'impossible' happened)
GHC version 9.10.1:
colorGraph: trivially colorable nodes didn't color!
ksTriv = [%vDouble_cd8E, %vI_nd90, %vI_nd91, %vI_nd92, %vI_nd93,
%vI_nd94, %vI_nd95, %vI_nd96, %vI_nd97, %vI_nd98, %vI_nd99,
%vI_nd9a, %vI_nd9b, %vI_nd9c, %vDouble_nd9d, %vDouble_nd9e,
%vI_nd9f, %vI_nd9g, %vI_nd9h, %vI_scIF, %vDouble_scIG, %vI_scIH,
%vDouble_scIL]
ksNoTriv = [%vDouble_scIL, %vDouble_scIG]
colors = [L0 :-> {%r0, %r1, %r2, %r3, %r4, %r5, %r6, %r7, %r8,
%r9, %r10, %r11, %r12, %r13, %r14, %r15, %r17},
L2 :-> {%r32, %r33, %r34, %r35, %r36, %r37, %r38, %r39, %r48, %r49,
%r50, %r51, %r52, %r53, %r54, %r55, %r56, %r57, %r58, %r59, %r60,
%r61, %r62, %r63}]
graph G {
node [label="%vDouble_cd8E :: D\n(%r32)" style=filled fillcolor="white"] "%vDouble_cd8E";
node [label="%vI_nd90 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd90";
node [label="%vI_nd91 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd91";
node [label="%vI_nd92 :: I\n(%r1)" style=filled fillcolor="white"] "%vI_nd92";
node [label="%vI_nd93 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd93";
node [label="%vI_nd94 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd94";
node [label="%vI_nd95 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd95";
node [label="%vI_nd96 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd96";
node [label="%vI_nd97 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd97";
node [label="%vI_nd98 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd98";
node [label="%vI_nd99 :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd99";
node [label="%vI_nd9a :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9a";
node [label="%vI_nd9b :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9b";
node [label="%vI_nd9c :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9c";
node [label="%vDouble_nd9d :: D\n(%r32)" style=filled fillcolor="white"] "%vDouble_nd9d";
node [label="%vDouble_nd9e :: D\n(%r32)" style=filled fillcolor="white"] "%vDouble_nd9e";
node [label="%vI_nd9f :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9f";
node [label="%vI_nd9g :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9g";
node [label="%vI_nd9h :: I\n(%r0)" style=filled fillcolor="white"] "%vI_nd9h";
node [label="%vI_scIF :: I\n(%r1)" style=filled fillcolor="white"] "%vI_scIF";
node [label="%vDouble_scIG :: D\n-%r0 -%r1 -%r2 -%r3 -%r4 -%r5 -%r6 -%r7 -%r8 -%r9 -%r10 -%r11 -%r12 -%r13 -%r14 -%r15 -%r17 -%r32 -%r33 -%r34 -%r35 -%r36 -%r37 -%r38 -%r39 -%r48 -%r49 -%r50 -%r51 -%r52 -%r53 -%r54 -%r55 -%r56 -%r57 -%r58 -%r59 -%r60 -%r61 -%r62 -%r63\n(triv)" style=filled fillcolor=white] "%vDouble_scIG";
node [label="%vI_scIH :: I\n(%r2)" style=filled fillcolor="white"] "%vI_scIH";
node [label="%vI_scIJ :: I\n-%r0 -%r1 -%r2 -%r3 -%r4 -%r5 -%r6 -%r7 -%r8 -%r9 -%r10 -%r11 -%r12 -%r13 -%r14 -%r15 -%r17 -%r32 -%r33 -%r34 -%r35 -%r36 -%r37 -%r38 -%r39 -%r48 -%r49 -%r50 -%r51 -%r52 -%r53 -%r54 -%r55 -%r56 -%r57 -%r58 -%r59 -%r60 -%r61 -%r62 -%r63\n(spill?)" style=filled fillcolor=white] "%vI_scIJ";
node [label="%vDouble_scIL :: D\n-%r0 -%r1 -%r2 -%r3 -%r4 -%r5 -%r6 -%r7 -%r8 -%r9 -%r10 -%r11 -%r12 -%r13 -%r14 -%r15 -%r17 -%r32 -%r33 -%r34 -%r35 -%r36 -%r37 -%r38 -%r39 -%r48 -%r49 -%r50 -%r51 -%r52 -%r53 -%r54 -%r55 -%r56 -%r57 -%r58 -%r59 -%r60 -%r61 -%r62 -%r63\n(triv)" style=filled fillcolor=white] "%vDouble_scIL";
"%vDouble_cd8E" -- "%vI_nd9c";
"%vDouble_cd8E" -- "%vDouble_scIG";
"%vDouble_cd8E" -- "%vI_scIJ";
"%vDouble_cd8E" -- "%vDouble_scIL";
"%vI_nd90" -- "%vI_scIF";
"%vI_nd90" -- "%vDouble_scIG";
"%vI_nd91" -- "%vI_nd92";
"%vI_nd91" -- "%vDouble_scIG";
"%vI_nd91" -- "%vI_scIH";
"%vI_nd92" -- "%vDouble_scIG";
"%vI_nd92" -- "%vI_scIH";
"%vI_nd93" -- "%vDouble_scIG";
"%vI_nd93" -- "%vI_scIH";
"%vI_nd97" -- "%vDouble_scIG";
"%vI_nd97" -- "%vI_scIH";
"%vI_nd98" -- "%vDouble_scIG";
"%vI_nd9a" -- "%vDouble_scIG";
"%vI_nd9a" -- "%vI_scIH";
"%vI_nd9b" -- "%vDouble_scIG";
"%vI_nd9b" -- "%vI_scIH";
"%vI_nd9c" -- "%vDouble_scIG";
"%vI_nd9c" -- "%vI_scIJ";
"%vI_nd9c" -- "%vDouble_scIL";
"%vDouble_nd9d" -- "%vDouble_scIG";
"%vI_scIF" -- "%vDouble_scIG";
"%vI_scIF" -- "%vI_scIH";
"%vDouble_scIG" -- "%vI_scIH";
"%vDouble_scIG" -- "%vI_scIJ";
"%vDouble_scIG" -- "%vDouble_scIL";
"%vI_scIJ" -- "%vDouble_scIL";
}
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/GHC/Utils/Panic.hs:190:37 in ghc-9.10.1-64dd:GHC.Utils.Panic
pprPanic, called at compiler/GHC/Data/Graph/Color.hs:106:17 in ghc-9.10.1-64dd:GHC.Data.Graph.Color
CallStack (from HasCallStack):
panic, called at compiler/GHC/Utils/Error.hs:507:29 in ghc-9.10.1-64dd:GHC.Utils.Error
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Environment
- GHC version used: 9.10, 9.8, 9.2
Optional:
- Operating System: OS X 14.5
- System Architecture: Aarch64 (M1)
Edited by Vanessa McHale