Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,410
    • Issues 5,410
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 605
    • Merge requests 605
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18162
Closed
Open
Issue created May 08, 2020 by Sebastian Graf@sgraf812Developer

Simplifier panics ("Tick in rule") after SpecConstr and CSE due to `postInlineUnconditionally` inside RULE LHS

In !3187 (closed) I rather unexpectedly hit a compiler panic. To reproduce, build a validate-x86_64-linux-deb9-dwarf job (source notes -g and -O2 for SpecConstr are essential) of !3187 (closed). Then you'll eventually get

 ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 8.11.0.20200508:
	Tick in rule
  src<libraries/Cabal/Cabal/Distribution/Simple/GHC/Internal.hs:456:30-58>
  src<libraries/Cabal/Cabal/Distribution/Simple/Flag.hs:95:1-13>
  ds60_sskS
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Outputable.hs:1218:37 in ghc:GHC.Utils.Outputable
        pprPanic, called at compiler/GHC/Core/Rules.hs:723:5 in ghc:GHC.Core.Rules
Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

while compiling libraries/Cabal/Cabal/Distribution/Simple/GHC.hs. I couldn't come up with a smaller reproducer yet. But I managed to pin-point the faulty behavior to a flaw in a rather painful debugging process to postInlineUnconditionally/occurrence analysis.

TLDR; As far as I can tell we need something like the occ_rules_only taint from weakLoopBreaker for OccMany/basically all other OccInfo fields to keep postInlineUnconditionally from triggering when a varaible occurs in an LHS of a RULE.

Edited May 09, 2020 by Sebastian Graf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking