Avoid an assertion failure in abstractFloats
The function GHC.Core.Opt.Simplify.Utils.abstractFloats was carelessly calling lookupIdSubst_maybe on a CoVar; but a precondition of the latter is being given an Id. In fact it's harmless to call it on a CoVar, but still, the precondition on lookupIdSubst_maybe makes sense, so I added a test for CoVars. This avoids a crash in a DEBUG compiler, but otherwise has no effect. Fixes #23426.
Showing
- compiler/GHC/Core/Opt/Simplify/Utils.hs 3 additions, 0 deletionscompiler/GHC/Core/Opt/Simplify/Utils.hs
- testsuite/tests/simplCore/should_compile/T23426.hs 8 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T23426.hs
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 1 deletiontestsuite/tests/simplCore/should_compile/all.T
Loading
Please register or sign in to comment