Opened 6 months ago

Closed 6 months ago

#8464 closed bug (duplicate)

ghc -C crashes on Hello World

Reported by: ygramoel Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.2
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets: #7563, #5582

Description

johan@morla:~/haskell\> cat hello.hs
main = putStrLn "Hello, World!"
johan@morla:~/haskell\> ghc -C hello.hs

addFlag by -C on the commandline:

Warning: The -fvia-C flag does nothing; it will be removed in a future GHC release

ghc: panic! (the 'impossible' happened)

(GHC version 7.4.2 for x86_64-unknown-linux):

pipeLoop: at phase As but I wanted to stop at phase HCc

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

Change History (6)

comment:1 Changed 6 months ago by carter

  • Resolution set to invalid
  • Status changed from new to closed

the flag -C is only for unregisterized GHC builds, ie when you've built GHC using -f-viaC (-f-viaC is still used in GHC to support targets like PPC64 and other archs we don't have a native code gen for, like MIP i believe).

It won't work with standard GHC builds on x86_64 that are registerized and use the native codegen.

closing this for now.

what was the goal of using -C ?

comment:2 Changed 6 months ago by monoidal

The problem was in fact fixed in #5582.

carter: GHC should not panic if you just use its flags incorrectly.

comment:3 Changed 6 months ago by carter

ok, good point :)

comment:4 Changed 6 months ago by ygramoel

Thanks for the very fast reply.

I agree with monoidal: GHC should not panic if you just use its flags incorrectly. Resolution "invalid" seems inappropriate, "duplicate" (of #5582) would have been more appropriate.

BTW: I have tried to reproduce the problem on ghc-7.6.3, but was not able to install it: see #8465.

The reason for using -C was essentially just curiosity. I was trying to get more insight in how Haskell is translated to executable code. I am sure that there must be useful documents explaining this, but sometimes looking at code for concrete examples helps.

comment:5 Changed 6 months ago by jstolarek

  • Resolution invalid deleted
  • Status changed from closed to new

comment:6 Changed 6 months ago by jstolarek

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.