[commit: ghc] master: Testsuite: don't warn about missing specialisations (5d7a873)

git at git.haskell.org git at git.haskell.org
Wed Sep 2 15:40:17 UTC 2015


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5d7a873a6bae4e2be70252dbc585d766e129e9f9/ghc

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

commit 5d7a873a6bae4e2be70252dbc585d766e129e9f9
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Wed Sep 2 15:45:57 2015 +0200

    Testsuite: don't warn about missing specialisations
    
    They can only occur with `-O`, but we want tests to produce the same
    output for all test ways.
    
    This brings us closer to passing the complete testsuite.
    
    Differential Revision: https://phabricator.haskell.org/D1203


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

5d7a873a6bae4e2be70252dbc585d766e129e9f9
 compiler/specialise/Specialise.hs | 1 +
 testsuite/mk/test.mk              | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/compiler/specialise/Specialise.hs b/compiler/specialise/Specialise.hs
index b68191f..e3501df 100644
--- a/compiler/specialise/Specialise.hs
+++ b/compiler/specialise/Specialise.hs
@@ -738,6 +738,7 @@ warnMissingSpecs :: DynFlags -> [Id] -> Bool
 -- See Note [Warning about missed specialisations]
 warnMissingSpecs dflags callers
   | wopt Opt_WarnAllMissedSpecs dflags = True
+  | not (wopt Opt_WarnMissedSpecs dflags) = False
   | null callers                       = False
   | otherwise                          = all has_inline_prag callers
   where
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 7a4e4f1..920d634 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -44,6 +44,10 @@ TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-
 #
 TEST_HC_OPTS += -fno-warn-tabs
 
+# Don't warn about missing specialisations. They can only occur with `-O`, but
+# we want tests to produce the same output for all test ways.
+TEST_HC_OPTS += -fno-warn-missed-specialisations
+
 RUNTEST_OPTS =
 
 ifeq "$(filter $(TargetOS_CPP), cygwin32 mingw32)" ""



More information about the ghc-commits mailing list