summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_fail/CheckOverlapCopyAddrToByteArray.hs
blob: 7da97ef23435bcbd5e60a8ba9e84002f991aedcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE MagicHash #-}

module Main where

import GHC.Exts
import GHC.IO

main :: IO ()
main = do
    IO $ \s0 ->
      case newPinnedByteArray# 7# s0 of
        (# s1, marr #) -> case mutableByteArrayContents# marr of
          ptr -> (# copyAddrToByteArray# ptr marr 3# 4# s1, () #)