Commit 4d11ac39 authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for #1959

parent c5cbe3fe
module Main where
import C (x)
import GHC.Base (inline)
main = print (inline x)
module C (x) where
import D
x = f 2
module D (f) where
import E
{-# INLINE f #-}
f :: Int -> Int
f x = h x
module E (h) where
h :: Int -> Int
h x = x + x + x + x + x + x + x + x
module E (h) where
h :: Int -> Int
h x = x + x + x + x + x + x + x
include $(TOP)/mk/
include $(TOP)/mk/
# Test recompilation bug #1959, which failed in 6.8.1 (and earlier)
compile ::
$(TEST_HC) -c -O E.hs
$(TEST_HC) -c -O D.hs
$(TEST_HC) -c -O -funfolding-use-threshold=0 C.hs
$(TEST_HC) -c -O B.hs
$(TEST_HC) E.o D.o C.o B.o -o prog
clean ::
rm -f *.o *.hi E.hs
dotest ::
@$(MAKE) clean >compile.out 2>&1
@cp E1.hs E.hs
@$(MAKE) compile >compile.out 2>&1
@sleep 1
@cp E2.hs E.hs
@$(MAKE) compile >compile.out 2>&1
test('1959', expect_broken(1959), run_command, ['$MAKE -s --no-print-directory dotest'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment