Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,625
    • Issues 3,625
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 199
    • Merge Requests 199
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9329

Closed
Open
Opened Jul 18, 2014 by Herbert Valerio Riedel@hvr🕺
  • Report abuse
  • New issue
Report abuse New issue

GHC panics when Cmm-compiling `STK_CHK_GEN_N (8);`

The following Cmm code snippet compiles fine

foo ()
{
  STK_CHK_GEN_N (((1)*8)); /* works */
  return (0);
}

The following one, however, only compiles with -O0, but panics with -O1 or more:

foo ()
{
  STK_CHK_GEN_N (8); /* panics */
  return (0);
}
ghc: panic! (the 'impossible' happened)
  (GHC version 7.8.3 for x86_64-unknown-linux):
	bundle
    c1 foo [(c1,
             label: block{v c1}_info
             rep:StackRep [])]
    [(c0, {}), (c3, {})]
    foo() //  []
            { info_tbl: [(c1,
                          label: block{v c1}_info
                          rep:StackRep [])]
              stack_info: arg_space: 8 updfr_space: Just 8
            }
        {offset
          c0: R1 = 0;
              call (P64[Sp])(R1) args: 8, res: 0, upd: 8;
        }
    }

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
7.8.4
Milestone
7.8.4
Assign milestone
Time tracking
None
Due date
None
4
Labels
bug compiler crash P::normal Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#9329