a1fc58f89be66daa3b06f8c68ceceb92cfc35acd
[ghc.git] / testsuite / tests / codeGen / should_compile / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 T2578:
6 '$(TEST_HC)' $(TEST_HC_OPTS) --make T2578 -fforce-recomp -v0
7
8 debug:
9 # Without optimisations, we should get annotations for basically
10 # all expressions in the example program.
11 echo == Dbg ==
12 '$(TEST_HC)' $(TEST_HC_OPTS) debug -fforce-recomp -g -ddump-cmm-verbose \
13 | grep -o src\<debug.hs:.*\> | sort -u
14 ./debug
15
16 # With optimisations we will get fewer annotations.
17 echo == Dbg -O2 ==
18 '$(TEST_HC)' $(TEST_HC_OPTS) debug -fforce-recomp -g -ddump-cmm-verbose -O2 \
19 > debug.cmm
20 cat debug.cmm | grep -o src\<debug.hs:.*\> | sort -u
21
22 # Common block elimination should merge the blocks
23 # corresponding to alternatives 1 and 2, therefore there
24 # must be a block containing exactly these two annotations
25 # directly next to each other.
26 echo == CBE ==
27 cat debug.cmm | grep -A1 -B1 src\<debug.hs:3:.*\> \
28 | grep src\<debug.hs:4:.*\> \
29 | grep -o src\<.*\> | sort -u
30
31 ./debug
32 rm debug
33
34 T14999:
35 '$(TEST_HC)' $(TEST_HC_OPTS) -O2 -g -c T14999.cmm -o T14999.o
36 gdb --batch -ex 'file T14999.o' -ex 'disassemble stg_catch_frame_info' --nx | tr -s '[[:blank:]\n]'
37 readelf --debug-dump=frames-interp T14999.o | tr -s '[[:blank:]\n]'
38
39 T15196:
40 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -ddump-asm T15196.hs | grep "jp " ; echo $$?