diff --git a/testsuite/tests/profiling/should_compile/T20938.hs b/testsuite/tests/profiling/should_compile/T20938.hs
new file mode 100644
index 0000000000000000000000000000000000000000..29370999236d2c0bcd969671b5a439b3fb26d4c5
--- /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 a6a6d50c7c33b3473a22efa976d0e1163cc8a8b2..a19a2fc49aaa2eefb0e40436d997fe85df4ba881 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 00a7a16025c56cc3a919bc8603f54f7d405193ce..fee845405028e8e7e18a85f919278576d48c19f5 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, [''])
-