[commit: ghc] ghc-7.10: Ensure DynFlags are consistent (28101c7)

git at git.haskell.org git at git.haskell.org
Thu Oct 22 15:09:36 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-7.10
Link       : http://ghc.haskell.org/trac/ghc/changeset/28101c7d2422e2fdbb4c2542afe07feb4024d0b6/ghc

>---------------------------------------------------------------

commit 28101c7d2422e2fdbb4c2542afe07feb4024d0b6
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Aug 6 17:25:46 2015 +0200

    Ensure DynFlags are consistent
    
    While we have always had makeDynFlagsConsistent to enforce a variety of
    consistency invariants on DynFlags, it hasn't been widely used.
    GHC.Main, for instance, ignored it entirely. This leads to issues like
    Trac #10549, where an OPTIONS_GHC pragma introduced an inconsistency,
    leading to a perplexing crash later in compilation.
    
    Here I add consistency checks in GHC.Main.set{Session,Program}DynFlags,
    closing this hole.
    
    Fixes #10549.
    
    Test Plan: Validate with T10549
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1128
    
    GHC Trac Issues: #10549
    
    Cherry-Picked-From: eca9a1a17c12d01636417fb88bda5ee5fe34577f


>---------------------------------------------------------------

28101c7d2422e2fdbb4c2542afe07feb4024d0b6
 compiler/main/DynFlags.hs                          | 36 ++++++++++++++++++++--
 compiler/main/GHC.hs                               | 27 +++-------------
 testsuite/tests/ghc-api/T10052/T10052.stderr       |  2 +-
 .../tests/ghci.debugger/scripts/print007.stderr    |  5 +--
 .../should_compile => ghci/should_fail}/Makefile   |  0
 testsuite/tests/ghci/should_fail/T10549.hs         | 15 +++++++++
 testsuite/tests/ghci/should_fail/T10549.script     |  1 +
 .../should_fail/T10549.stderr}                     |  2 +-
 testsuite/tests/ghci/should_fail/all.T             |  3 ++
 9 files changed, 61 insertions(+), 30 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 28101c7d2422e2fdbb4c2542afe07feb4024d0b6


More information about the ghc-commits mailing list