diff --git a/ghc/tests/codeGen/Makefile b/ghc/tests/codeGen/Makefile
index 1860de22a99ea08a20418682dd65d3d1e7ef1f75..ebd36e1ea1883822ab564cec9346a53c58b3cccc 100644
--- a/ghc/tests/codeGen/Makefile
+++ b/ghc/tests/codeGen/Makefile
@@ -1,11 +1,9 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.3 1997/12/16 17:15:11 simonm Exp $
+# $Id: Makefile,v 1.4 2000/09/06 10:28:48 simonmar Exp $
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
 
-SUBDIRS = should_run
+SUBDIRS = should_compile should_run
 
 include $(TOP)/mk/target.mk
-
-
diff --git a/ghc/tests/codeGen/should_compile/Makefile b/ghc/tests/codeGen/should_compile/Makefile
new file mode 100644
index 0000000000000000000000000000000000000000..04a458b599e88c01cb0901de4a399b348e2a2878
--- /dev/null
+++ b/ghc/tests/codeGen/should_compile/Makefile
@@ -0,0 +1,8 @@
+# -----------------------------------------------------------------------------
+# $Id: Makefile,v 1.1 2000/09/06 10:28:48 simonmar Exp $
+
+TOP = ../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/should_compile.mk
+
+include $(TOP)/mk/target.mk
diff --git a/ghc/tests/codeGen/should_compile/cg001.hs b/ghc/tests/codeGen/should_compile/cg001.hs
new file mode 100644
index 0000000000000000000000000000000000000000..3c3acd699a416802435c9e5ce4cb4a06333d3eb4
--- /dev/null
+++ b/ghc/tests/codeGen/should_compile/cg001.hs
@@ -0,0 +1,15 @@
+{-# OPTIONS -fglasgow-exts #-}
+
+module ShouldCompile where
+
+import PrelGHC
+
+data STRef s a = STRef (MutVar# s a)
+
+-- ghc 4.08 had a problem with returning a MutVar#.
+
+from :: STRef s a -> MutVar# s a
+from (STRef x) = x
+
+to :: MutVar# s a -> STRef s a
+to x = STRef x