diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index bbb2174e740d8eae545204dd731212a85ca368e8..4750b04c797866f134665821661e891aec0c2bf4 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -1046,6 +1046,7 @@ mk/ghcconfig*_inplace_bin_ghc-stage2.exe.mk
 /tests/numeric/should_run/T7689
 /tests/numeric/should_run/T8726
 /tests/numeric/should_run/T9810
+/tests/numeric/should_run/T10011
 /tests/numeric/should_run/add2
 /tests/numeric/should_run/arith001
 /tests/numeric/should_run/arith002
diff --git a/testsuite/tests/numeric/should_run/T10011.hs b/testsuite/tests/numeric/should_run/T10011.hs
new file mode 100644
index 0000000000000000000000000000000000000000..91a0ecdba848debd54e2cb195f8a99b011f2feaa
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/T10011.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE ScopedTypeVariables, TypeOperators, GADTs #-}
+module Main
+       ( main -- :: IO ()
+       ) where
+import Data.Data
+import Data.Ratio
+
+main :: IO ()
+main =
+  let bad = gmapT (\(x :: b) ->
+              case eqT :: Maybe (b :~: Integer) of
+                Nothing -> x;
+                Just Refl -> x * 2) (1 % 2) :: Rational
+  in print (bad == numerator bad % denominator bad)
diff --git a/testsuite/tests/numeric/should_run/T10011.stdout b/testsuite/tests/numeric/should_run/T10011.stdout
new file mode 100644
index 0000000000000000000000000000000000000000..0ca95142bb715442d0c2c82a7c573a08c4593845
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/T10011.stdout
@@ -0,0 +1 @@
+True
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index 62622799b801bd1f7351ad356749f74e1ecc3aa4..4369430e8cef48c07296e161d340d7fd5028f3b9 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -64,3 +64,4 @@ test('NumDecimals', normal, compile_and_run, [''])
 test('T8726', normal, compile_and_run, [''])
 test('CarryOverflow', omit_ways(['ghci']), compile_and_run, [''])
 test('T9810', normal, compile_and_run, [''])
+test('T10011', normal, compile_and_run, [''])