[commit: ghc] master: Remove redundant flag (-O) registration (fixes #13392) (b894f02)
git at git.haskell.org
git at git.haskell.org
Tue Apr 18 00:35:26 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/b894f02058a10b5b0a4074020feae2771e793577/ghc
>---------------------------------------------------------------
commit b894f02058a10b5b0a4074020feae2771e793577
Author: Santiago Munin <santimunin at gmail.com>
Date: Mon Apr 17 12:44:52 2017 -0400
Remove redundant flag (-O) registration (fixes #13392)
Reviewers: austin, bgamari, dfeuer
Reviewed By: bgamari, dfeuer
Subscribers: rwbarton, thomie
GHC Trac Issues: #13392
Differential Revision: https://phabricator.haskell.org/D3461
>---------------------------------------------------------------
b894f02058a10b5b0a4074020feae2771e793577
compiler/main/DynFlags.hs | 1 -
testsuite/tests/{cabal/pkg02 => driver/T13392}/Makefile | 2 ++
testsuite/tests/{arityanal/Makefile => driver/T13392/T13392.stdout} | 0
testsuite/tests/driver/T13392/all.T | 3 +++
4 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 020ee50..b3600b8 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3141,7 +3141,6 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "ffrontend-opt" (hasArg addFrontendPluginOption)
------ Optimisation flags ------------------------------------------
- , make_ord_flag defGhcFlag "O" (noArgM (setOptLevel 1))
, make_dep_flag defGhcFlag "Onot" (noArgM $ setOptLevel 0 )
"Use -O0 instead"
, make_ord_flag defGhcFlag "Odph" (noArgM setDPHOpt)
diff --git a/testsuite/tests/cabal/pkg02/Makefile b/testsuite/tests/driver/T13392/Makefile
similarity index 51%
copy from testsuite/tests/cabal/pkg02/Makefile
copy to testsuite/tests/driver/T13392/Makefile
index 4a26853..9d3c125 100644
--- a/testsuite/tests/cabal/pkg02/Makefile
+++ b/testsuite/tests/driver/T13392/Makefile
@@ -2,3 +2,5 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
+T13392:
+ '$(TEST_HC)' $(TEST_HC_OPTS) --show-options | sort | uniq -d
diff --git a/testsuite/tests/arityanal/Makefile b/testsuite/tests/driver/T13392/T13392.stdout
similarity index 100%
copy from testsuite/tests/arityanal/Makefile
copy to testsuite/tests/driver/T13392/T13392.stdout
diff --git a/testsuite/tests/driver/T13392/all.T b/testsuite/tests/driver/T13392/all.T
new file mode 100644
index 0000000..1f2bd40
--- /dev/null
+++ b/testsuite/tests/driver/T13392/all.T
@@ -0,0 +1,3 @@
+# Test for #13392, it makes sure 'ghc --show-options' does not print each flag more than once.
+
+test('T13392', normal, run_command, ['$MAKE -s --no-print-directory T13392'])
More information about the ghc-commits
mailing list