diff --git a/testsuite/tests/deriving/should_compile/T8851.hs b/testsuite/tests/deriving/should_compile/T8851.hs
new file mode 100644
index 0000000000000000000000000000000000000000..84f0ad4ac1edbe1299216678e08ec6c8ab20b12f
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T8851.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+
+module T8851 where
+
+import Control.Applicative
+
+class Parsing m where
+  notFollowedBy :: (Monad m, Show a) => m a -> m ()
+
+data Parser a
+instance Parsing Parser where
+  notFollowedBy = undefined
+
+instance Functor Parser where
+  fmap = undefined
+instance Applicative Parser where
+  pure = undefined
+  (<*>) = undefined
+instance Monad Parser where
+  return = undefined
+  (>>=) = undefined
+
+newtype MyParser a = MkMP (Parser a)
+  deriving Parsing
\ No newline at end of file
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index a7cc3df01b199386a0b86f48d87b34167b457135..8620c36dc5e6bf2dd15b5f50d040c80686653fde 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -43,4 +43,5 @@ test('AutoDeriveTypeable', normal, compile, [''])
 
 test('T8138', reqlib('primitive'), compile, ['-O2'])
 test('T8631', normal, compile, [''])
-test('T8758', extra_clean(['T8758a.o', 'T8758a.hi']), multimod_compile, ['T8758a', '-v0'])
\ No newline at end of file
+test('T8758', extra_clean(['T8758a.o', 'T8758a.hi']), multimod_compile, ['T8758a', '-v0'])
+test('T8851', expect_broken(8851), compile, [''])
\ No newline at end of file