Opened 2 years ago

Closed 2 years ago

Last modified 2 months ago

#7563 closed bug (fixed)

Passing -C flag causes the 'impossible' to happen

Reported by: jstolarek Owned by: igloo
Priority: normal Milestone: 7.8.1
Component: Driver Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case: T7563
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Passing -C flag to GHC causes compiler panic:

addFlag by -C on the commandline: Warning:
    The -fvia-C flag does nothing; it will be removed in a future GHC release
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.7.20130108 for x86_64-unknown-linux):
        pipeLoop: at phase As but I wanted to stop at phase HCc

Comment in "main/DriverPipeline.hs", lines 665-668 suggests that this behaviour might happen with native code generator. If C codegen is being removed, then -C flag should perhaps be removed as well (also from the documentation)?

Change History (4)

comment:1 Changed 2 years ago by simonmar

  • difficulty set to Unknown
  • Milestone set to 7.8.1
  • Owner set to igloo

This was broken in the past, fixed by 9c685f44e873f01403fd83209487faa64aeb47fb, and then broken again by this commit which left a TODO to fix it:

commit f917eeb824cfb7143dde9b12e501d4ddb0049b65

Author: Ian Lynagh <[email protected]>
Date:   Tue Aug 7 01:27:44 2012 +0100

    Add "Unregisterised" as a field in the settings file
    
    To explicitly choose whether you want an unregisterised build you now
    need to use the "--enable-unregisterised"/"--disable-unregisterised"
    configure flags.

comment:2 Changed 2 years ago by ian@…

commit 68833e5e8caa1c23f75ab8bea4377ede28ff9548

Author: Ian Lynagh <[email protected]>
Date:   Fri Jan 11 18:42:40 2013 +0000

    Make "happensBefore" take account of whether we are unregisterised
    
    If we are not unregisterised then we skip the HCc phase.
    Fixes #7563.

 compiler/main/DriverPhases.hs   |   61 +++++++++++++++++++++-----------------
 compiler/main/DriverPipeline.hs |   11 ++++---
 2 files changed, 40 insertions(+), 32 deletions(-)

comment:3 Changed 2 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to T7563

Fixed, and test added.

comment:4 Changed 2 months ago by Thomas Miedema <thomasmiedema@…>

In 9e073ce41ff471d0b734ace095ece2a3e4c02f68/ghc:

Explicitly check for -C on registerised build (#7563)

Show a more descriptive error message.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D775
Note: See TracTickets for help on using tickets.