diff --git a/ghc/tests/reader/should_compile/Makefile b/ghc/tests/reader/should_compile/Makefile
index d55ad91c2b3d383750d3b900ab1cd38b4af52573..1eb42d53027853c05a881dec188577ad8062178d 100644
--- a/ghc/tests/reader/should_compile/Makefile
+++ b/ghc/tests/reader/should_compile/Makefile
@@ -2,8 +2,10 @@ TOP = ../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/should_compile.mk
 
-SRC_HC_OPTS += -noC -dcore-lint
+SRC_HC_OPTS += -dcore-lint
 
 read004_HC_OPTS = -fno-implicit-prelude
+read012_HC_OPTS += -O -funfold-casms-in-hi-file -fglasgow-exts
+read013_HC_OPTS += -O -funfold-casms-in-hi-file -fglasgow-exts
 
 include $(TOP)/mk/target.mk
diff --git a/ghc/tests/reader/should_compile/read012.hs b/ghc/tests/reader/should_compile/read012.hs
new file mode 100644
index 0000000000000000000000000000000000000000..a667c9e071f8a6637dae52446062d74366ada52a
--- /dev/null
+++ b/ghc/tests/reader/should_compile/read012.hs
@@ -0,0 +1,3 @@
+module T1 where
+malloc :: IO Int
+malloc = _casm_ ``%r = 42;''
diff --git a/ghc/tests/reader/should_compile/read013.hs b/ghc/tests/reader/should_compile/read013.hs
new file mode 100644
index 0000000000000000000000000000000000000000..214e20fbb70585e476b91546bb1f91d984108d00
--- /dev/null
+++ b/ghc/tests/reader/should_compile/read013.hs
@@ -0,0 +1,4 @@
+module T2 where
+import T1
+blah :: IO Int
+blah = malloc