summaryrefslogtreecommitdiff
path: root/testsuite/tests/llvm/should_compile/T8131b.hs
blob: b9bc1f6184c47667c561b2dfdca98f45f07e72f5 (plain)
1
2
3
4
5
6
7
8
9
{-# LANGUAGE MagicHash, UnboxedTuples #-}
import GHC.Prim
import GHC.IO

main = IO $ \s ->
  let (# s1, p0 #) = newByteArray# 10# s
      (# s2, p #) = unsafeFreezeByteArray# p0 s1
      (# s3, q #) = newByteArray# 10# s2
  in (# copyByteArray# p 0# q 0# 10# s, () #)