summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/T16514.hs
blob: 12e0d36221711034cf5def9bb1e966b0833ce1f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- ensure that the XMM register values are properly preserved across STG
-- exit/entry. Note that this is very sensitive to code generation.

module Main where

import Control.Monad (when)
import System.Exit (exitWith, ExitCode(..))

foreign export ccall fn_hs :: IO ()

fn_hs :: IO ()
fn_hs = return ()

foreign import ccall test  :: IO Int

main :: IO ()
main = do res <- test
          when (res /= 0) (exitWith $ ExitFailure res)