summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/simplCore/should_compile/T4306.hs
blob: ba32981f6108835596fb32a8cc839fc97be97633 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
-- Trac #4306
-- Check that the worker for 'upd' has only one argument

module T4306 where

data D = D {-# UNPACK #-} !Double {-# UNPACK #-} !Double  
data UPD = UPD {-# UNPACK #-} !Double D

upd (UPD _ (D x _)) = sqrt $! (x*x + x*x + sin x + x*x + x*x + cos x + x*x + x*x + tan x +
                               x*x + x*x + sin x + x*x + x*x + cos x + x*x + x*x + tan x +
                               x*x + x*x + sin x + x*x + x*x + cos x + x*x + x*x + tan x)
                               -- make the rhs large enough to be worker/wrapperred