diff --git a/testsuite/tests/patsyn/should_compile/T9023.hs b/testsuite/tests/patsyn/should_compile/T9023.hs
new file mode 100644
index 0000000000000000000000000000000000000000..3a8614009fff53c3805987f85269829636d41a46
--- /dev/null
+++ b/testsuite/tests/patsyn/should_compile/T9023.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE PatternSynonyms #-}
+
+module T9023 where
+
+pattern P a b = Just (a, b)
+foo P{} = True
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T
index ecc470166123f53d6f2bd8ce944a332ad300df98..d851bc3ac837f49f5f3d98bffadc7e9cc3575458 100644
--- a/testsuite/tests/patsyn/should_compile/all.T
+++ b/testsuite/tests/patsyn/should_compile/all.T
@@ -9,3 +9,4 @@ test('num', normal, compile, [''])
 test('incomplete', normal, compile, [''])
 test('export', normal, compile, [''])
 test('T8966', normal, compile, [''])
+test('T9023', normal, compile, [''])