summaryrefslogtreecommitdiff
path: root/testsuite/tests/profiling
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2022-01-12 16:42:26 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-14 10:36:21 -0500
commit52a4f5ab44a7d4c89189b9132a5560cb85d18714 (patch)
treeab222e0e4d05a32578c4d06ab6bdd14c08040dbc /testsuite/tests/profiling
parent1aace89449a8935eff5040702c603bb7945efb61 (diff)
downloadhaskell-52a4f5ab44a7d4c89189b9132a5560cb85d18714.tar.gz
Add test for #20938.
Diffstat (limited to 'testsuite/tests/profiling')
-rw-r--r--testsuite/tests/profiling/should_compile/T20938.hs10
-rw-r--r--testsuite/tests/profiling/should_compile/all.T1
-rw-r--r--testsuite/tests/profiling/should_fail/all.T1
3 files changed, 11 insertions, 1 deletions
diff --git a/testsuite/tests/profiling/should_compile/T20938.hs b/testsuite/tests/profiling/should_compile/T20938.hs
new file mode 100644
index 0000000000..2937099923
--- /dev/null
+++ b/testsuite/tests/profiling/should_compile/T20938.hs
@@ -0,0 +1,10 @@
+{-# language MagicHash #-}
+
+-- We can't put code ticks between things which are required to be saturated
+-- and their arguments.
+module T20938 where
+
+import GHC.Exts
+
+foo x = ({-# SCC foo #-} tagToEnum#) x :: Bool
+
diff --git a/testsuite/tests/profiling/should_compile/all.T b/testsuite/tests/profiling/should_compile/all.T
index a6a6d50c7c..a19a2fc49a 100644
--- a/testsuite/tests/profiling/should_compile/all.T
+++ b/testsuite/tests/profiling/should_compile/all.T
@@ -10,3 +10,4 @@ test('T14931', [only_ways(['normal']), req_profiling, unless(have_dynamic(), ski
makefile_test, ['T14931'])
test('T15108', [only_ways(['normal']), req_profiling], compile, ['-O -prof -fprof-auto'])
test('T19894', [only_ways(['normal']), req_profiling, extra_files(['T19894'])], multimod_compile, ['Main', '-v0 -O2 -prof -fprof-auto -iT19894'])
+test('T20938', [only_ways(['normal']), req_profiling, expect_broken(20938)], compile, ['-O -prof'])
diff --git a/testsuite/tests/profiling/should_fail/all.T b/testsuite/tests/profiling/should_fail/all.T
index 00a7a16025..fee8454050 100644
--- a/testsuite/tests/profiling/should_fail/all.T
+++ b/testsuite/tests/profiling/should_fail/all.T
@@ -1,4 +1,3 @@
test('proffail001', normal, compile_fail, ['-prof -fprof-cafs'])
test('T17916', normal, compile_fail, [''])
-