[GHC] #9050: Panic when compiling cmm file together with -outputdir

#9050: Panic when compiling cmm file together with -outputdir -----------------------------------+--------------------------------------- Reporter: Yuras | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- To reproduce: {{{ $ touch test.cmm $ ghc -c test.cmm -outputdir=build ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.9.20140428 for x86_64-unknown-linux): hscCmmFile: no_mod }}} The panic is declared in `main/HscMain.hs:hscCompileCmmFile` in place of current module name, but forced in `main/CodeOutput.lhs:outputForeignStubs` by `doesFileExist`. It works without `-outputdir` because in that case module name is not used to create path to stub file, see `main/Finder.lhs:mkStubPaths`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9050 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9050: Panic when compiling cmm file together with -outputdir ---------------------------------------+----------------------------------- Reporter: Yuras | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by Yuras): * status: new => patch Comment: This issue is a bit annoying for me. I'm working with manually written cmm files, and I'm using -outputdir option a lot. I tried to replace the `panic` with dummy module, and it works. But I'm a bit concerned about module name clashes. Instead I removed the code that forces the thunk, ghc doesn't support compiling external core anyway. Probably it is better to replace `Module` with `Maybe Module` to be explicit, but it leads to a huge diff. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9050#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9050: Panic when compiling cmm file together with -outputdir ---------------------------------------+----------------------------------- Reporter: Yuras | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by Yuras): I know everybody is busy with more important thinks. Just raising in case it was just lost. Could anyone take a look please? Note: the code I want to delete is dead anyway because ghc doesn't support external core any more. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9050#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9050: Panic when compiling cmm file together with -outputdir
---------------------------------------+-----------------------------------
Reporter: Yuras | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
---------------------------------------+-----------------------------------
Comment (by Krzysztof Gogolewski

#9050: Panic when compiling cmm file together with -outputdir ---------------------------------------+----------------------------------- Reporter: Yuras | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by monoidal): * status: patch => merge * milestone: => 7.8.3 Comment: I've pushed; the change should be mergeable to 7.8, as Yuras said in comment:1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9050#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9050: Panic when compiling cmm file together with -outputdir ---------------------------------------+----------------------------------- Reporter: Yuras | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9050#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC