a7460b0d1474797097212407d075e2174e38faba
[ghc.git] / testsuite / tests / simplCore / should_compile / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 T8832:
6 $(RM) -f T8832.o T8832.hi
7 '$(TEST_HC)' $(TEST_HC_OPTS) $(T8832_WORDSIZE_OPTS) -O -c -ddump-simpl T8832.hs | grep '#'
8
9 T8274:
10 $(RM) -f T8274.o T8274.hi
11 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl T8274.hs | grep '#'
12
13 T7865:
14 $(RM) -f T7865.o T7865.hi
15 '$(TEST_HC)' $(TEST_HC_OPTS) -dsuppress-uniques -O2 -c -ddump-simpl T7865.hs | grep expensive
16
17 T3055:
18 $(RM) -f T3055.o T3055.hi T3055.simpl
19 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T3055.hs -ddump-simpl > T3055.simpl
20 grep 'I# -28#' T3055.simpl | sed 's/.*\(I# -28#\).*/\1/'
21
22 T5658b:
23 $(RM) -f T5658b.o T5658b.hi
24 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5658b.hs -ddump-simpl | grep -c indexIntArray
25 # Trac 5658 meant that there were three calls to indexIntArray instead of two
26
27 T5776:
28 $(RM) -f T5776.o T5776.hi
29 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5776.hs -ddump-rules | grep -c dEq
30
31 T3772:
32 $(RM) -f T3772*.hi T3772*.o
33 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T3772_A.hs
34 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T3772.hs -dsuppress-uniques -ddump-simpl
35
36 T4306:
37 $(RM) -f T4306.hi T4306.o
38 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4306.hs
39 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4306.hi | grep 'wupd ::'
40
41 T4201:
42 $(RM) -f T4201.hi T4201.o T4201.list
43 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4201.hs
44 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4201.hi > T4201.list
45 # poor man idea about how to replace GNU grep -B2 "Sym" invocation with pure POSIX tools
46 for i in `grep -n "Sym" T4201.list |cut -d ':' -f -1`; do head -$$i T4201.list | tail -3 ; done
47 $(RM) -f T4201.list
48
49 # This one looped as a result of bogus specialisation
50 T4903:
51 $(RM) -f T4903.hi T4903a.hi T4903a.o T4903.o
52 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4903a.hs -dcore-lint
53 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4903.hs -dcore-lint
54
55 T4918:
56 $(RM) -f T4918.hi T4918.o T4918a.hi T4918a.o
57 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918a.hs
58 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918.hs
59 '$(TEST_HC)' $(TEST_HC_OPTS) --show-iface T4918.hi | grep 'C#'
60
61 EvalTest:
62 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O EvalTest.hs -ddump-simpl -dsuppress-uniques | grep 'rght.*Dmd' | sed 's/^ *//'
63
64 T5168:
65 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O T5168.hs -ddump-simpl -dsuppress-uniques | grep 'patError')
66
67 # When SpecConstr works there are no STUArrays at all
68 # The "-(...)" ignores the (expected) non-zero exit code from grep
69 # when there are (as expected) no matches
70 T4945:
71 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 -fno-liberate-case T4945.hs -ddump-simpl -dsuppress-uniques | grep 'STUArray')
72
73 # When this one works there are no 'lets' at all
74 T4957:
75 -('$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4957.hs -ddump-simpl -dsuppress-uniques | grep 'let')
76
77 .PHONY: simpl021
78 simpl021:
79 $(RM) -f Simpl021A.hi Simpl021A.o Simpl021B.hi Simpl021B.o
80 '$(TEST_HC)' $(TEST_HC_OPTS) -c Simpl021A.hs -O
81 '$(TEST_HC)' $(TEST_HC_OPTS) -c Simpl021B.hs -O
82
83 .PHONY: T5327
84 T5327:
85 $(RM) -f T5327.hi T5327.o
86 '$(TEST_HC)' $(TEST_HC_OPTS) -c T5327.hs -O -ddump-simpl | grep -c '># 34# '
87
88 .PHONY: T5623
89 T5623:
90 $(RM) -f T5623.hi T5623.o
91 '$(TEST_HC)' $(TEST_HC_OPTS) -c T5623.hs -O -ddump-prep | grep -c "plusAddr#"
92
93 .PHONY: T4138
94 T4138:
95 $(RM) -f T4138.hi T4138.o
96 $(RM) -f T4138_A.hi T4138_A.o
97 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4138_A.hs
98 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4138.hs -ddump-simpl > T4138.simpl
99 grep -c 'F#' T4138.simpl
100
101 T7165:
102 $(RM) -f T7165.hi T7165a.hi T7165a.o T7165.o
103 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165a.hs -dcore-lint
104 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O2 T7165.hs -dcore-lint
105
106 T5366:
107 $(RM) -f T5366.hi T5366.o
108 '$(TEST_HC)' $(TEST_HC_OPTS) -ddump-simpl -dsuppress-uniques -c -O T5366.hs | grep 'Bar.*I#'
109
110 # We expect 0 occurrences of ' $sgo' in -ddump-prep. Mind the Makefile
111 # $-escaping. The -grep ignores grep's expected exit code of 1.
112 .PHONY: T7796
113 T7796:
114 '$(TEST_HC)' $(TEST_HC_OPTS) -O1 -c T7796.hs -ddump-prep > T7796.prep
115 (grep -q '$$w$$sgo' T7796.prep || echo 'could not find $$w$$sgo; compilation was not as expected')
116 -grep -c ' $$sgo' T7796.prep
117
118 T7995:
119 $(RM) -f T7995.hi T7995.o
120 '$(TEST_HC)' $(TEST_HC_OPTS) -package ghc -ddump-rule-firings -c -O T7995.hs | grep 'text/str'
121
122 T8221:
123 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221a.hs
124 '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -fforce-recomp T8221.hs
125
126 T5996:
127 $(RM) -f T5996.o T5996.hi
128 '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T5996.hs -ddump-simpl -dsuppress-uniques -dsuppress-all | grep y2