summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/profiling/should_run/T17573.hs26
-rw-r--r--testsuite/tests/profiling/should_run/all.T1
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_run/T17573.hs b/testsuite/tests/profiling/should_run/T17573.hs
new file mode 100644
index 0000000000..d92efc7434
--- /dev/null
+++ b/testsuite/tests/profiling/should_run/T17573.hs
@@ -0,0 +1,26 @@
+{-# OPTIONS_GHC -fprof-auto-top #-}
+
+module Main where
+
+data D = D
+
+class C a where
+ shouldn'tSCC :: a -> ()
+
+instance C D where
+ shouldn'tSCC D = ()
+ {-# INLINE shouldn'tSCC #-}
+
+hasSCC :: D -> ()
+hasSCC D = ()
+
+hasn'tSCC :: D -> ()
+hasn'tSCC D = ()
+{-# INLINE hasn'tSCC #-}
+
+main :: IO ()
+main = do
+ print (hasSCC D)
+ print (hasn'tSCC D)
+ print (shouldn'tSCC D)
+
diff --git a/testsuite/tests/profiling/should_run/all.T b/testsuite/tests/profiling/should_run/all.T
index fe98517d96..c6d2e0c541 100644
--- a/testsuite/tests/profiling/should_run/all.T
+++ b/testsuite/tests/profiling/should_run/all.T
@@ -151,3 +151,4 @@ test('T15897',
makefile_test, ['T15897'])
test('T17572', [], compile_and_run, [''])
+test('T17573', [], compile_and_run, [''])