diff options
Diffstat (limited to 'testsuite/tests/codeGen/should_run/T14346.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_run/T14346.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/T14346.hs b/testsuite/tests/codeGen/should_run/T14346.hs new file mode 100644 index 0000000000..b61b92bd07 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T14346.hs @@ -0,0 +1,21 @@ +module Main where + +import Control.Concurrent +import Control.Monad +import Data.Word +import Foreign.Marshal.Alloc +import Foreign.Storable +import Numeric +import GHC.Ptr + +main :: IO () +main = do + replicateM_ 49 $ threadDelay 1 + _ <- forkIO $ do + allocaBytes 4 $ \p -> do + forever $ do + poke p (0xDEADBEEF :: Word32) + threadDelay 10 + x <- peek p + unless (x == 0xDEADBEEF) $ putStrLn (showHex x "") + threadDelay 1000000 |