Skip to content
Snippets Groups Projects
Commit 0f1eb88c authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot
Browse files

Add perf test for #16190

parent 7f26b74e
No related branches found
No related tags found
No related merge requests found
{-# LANGUAGE TemplateHaskell #-}
module Main where
import T16190_Embed
import Foreign.Ptr
import Foreign.Storable
import Data.Word
import GHC.Ptr
ptr :: Ptr Word32
ptr = Ptr $(embedBytes (replicate (3 * 1000 * 1000) 0x37))
main :: IO ()
main = do
w <- peek (ptr `plusPtr` 12)
print (w == (0x37373737 :: Word32))
module T16190_Embed where
import Data.Word
import Language.Haskell.TH
embedBytes :: [Word8] -> Q Exp
embedBytes bs = return (LitE (StringPrimL bs))
...@@ -390,3 +390,9 @@ test ('T15164', ...@@ -390,3 +390,9 @@ test ('T15164',
], ],
compile, compile,
['-v0 -O']) ['-v0 -O'])
test('T16190',
[ collect_stats()
],
multimod_compile,
['T16190.hs', '-v0'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment