[GHC] #10560: -f and -O options interact in non-obvious, order dependent ways

GHC ghc-devs at haskell.org
Mon Jun 22 08:00:11 UTC 2015


#10560: -f and -O options interact in non-obvious, order dependent ways
-------------------------------------+-------------------------------------
              Reporter:  bgamari     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  Incorrect
  Unknown/Multiple                   |  warning at compile-time
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 The `-O[012]` and `-f*` flags are both implemented by manipulating a set
 of flags in `DynFlags`. These manipulations occur in the order that the
 flags occur in the command line. This leads to some rather surprising
 behavior.

 For instance, if the user wants to compile with optimization but
 specifically wants to disable specialisation, they might enter `-fno-
 specialise -O1`. This, however, would not do what the user expects as
 `-O1` implies `-fspecialise`, overriding the first flag.

 This is surprising and poorly documented behavior at best.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10560>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list