Commit cad62ef1 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot

Add tests for #17920

Metric Decrease:
    T12150
    T12234
parent 5f6a0665
Pipeline #21356 passed with stages
in 1162 minutes and 32 seconds
......@@ -1547,8 +1547,7 @@ def simple_build(name: Union[TestName, str],
# Required by GHC 7.3+, harmless for earlier versions:
if (getTestOpts().c_src or
getTestOpts().objc_src or
getTestOpts().objcpp_src or
getTestOpts().cmm_src):
getTestOpts().objcpp_src):
extra_hc_opts += ' -no-hs-main '
if getTestOpts().compile_cmd_prefix == '':
......
#
test('selfloop', [cmm_src], compile, [''])
test('selfloop', [cmm_src], compile, ['-no-hs-main'])
test('T16930', normal, makefile_test, ['T16930'])
test('T17442', normal, compile, [''])
......@@ -21,15 +21,15 @@ test('massive_array',
[ when(arch('i386'), omit_ways(llvm_ways)) ],
compile, ['-fPIC'])
test('T7237', normal, compile, [''])
test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, [''])
test('T7574', [cmm_src, omit_ways(llvm_ways)], compile, ['-no-hs-main'])
test('T8205', normal, compile, ['-O0'])
test('T9155', normal, compile, ['-O2'])
test('T9303', normal, compile, ['-O2'])
test('T9329', [when(unregisterised(), expect_broken(15467)), cmm_src], compile, [''])
test('T9329', [when(unregisterised(), expect_broken(15467)), cmm_src], compile, ['-no-hs-main'])
test('debug', normal, makefile_test, [])
test('T9964', normal, compile, ['-O'])
test('T10518', [cmm_src], compile, [''])
test('T10518', [cmm_src], compile, ['-no-hs-main'])
test('T10667', normal, compile, ['-g'])
test('T12115', normal, compile, [''])
test('T12355', normal, compile, [''])
......
......@@ -2,6 +2,6 @@
# Only the LLVM code generator consistently forces the alignment of
# memcpy operations
test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, [''])
test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, ['-no-hs-main'])
test('T13233', normal, compile_fail, [''])
test('T13233_elab', normal, compile_fail, ['-fprint-typechecker-elaboration'])
#include "Cmm.h"
section "rodata" { msg : bits8[] "Test\n"; }
section "data" { faketso : bits8[1000]; }
stg_myExit {
foreign "C" stg_exit(0);
}
stg_foo {
BaseReg = faketso;
SAVE_REGS();
foreign "C" printf(msg "ptr");
RESTORE_REGS();
jump stg_myExit [*]; // all registers live
}
INFO_TABLE_CONSTR(ZCMain_main,0,0,0,CONSTR_NOCAF,"MAIN","MAIN")
{
jump stg_foo [];
}
CLOSURE(ZCMain_main_closure,ZCMain_main);
......@@ -205,3 +205,5 @@ test('T15892',
test('T16617', normal, compile_and_run, [''])
test('T16449_2', exit_code(0), compile_and_run, [''])
test('T16846', [only_ways(['optasm']), exit_code(1)], compile_and_run, [''])
test('T17920', cmm_src, compile_and_run, [''])
......@@ -195,7 +195,7 @@ test('T8101b', normal, multimod_compile,
test('T10600', normal, compile_fail, ['-fno-code'])
# Should not panic when compiling cmm file together with -outputdir.
test('T9050', cmm_src, compile, ['-outputdir=.'])
test('T9050', cmm_src, compile, ['-outputdir=. -no-hs-main'])
test('write_interface_oneshot', [extra_files(['A011.hs'])], makefile_test, [])
......
#include "Cmm.h"
section "rodata" { msg : bits8[] "Test\n"; }
section "data" { faketso : bits8[1000]; }
stg_myExit {
foreign "C" exit(0);
}
stg_foo {
BaseReg = faketso;
SAVE_REGS();
D_ d1;
F_ f1;
d1 = D1;
f1 = F1;
foreign "C" printf(msg "ptr");
D1 = d1;
F1 = f1;
RESTORE_REGS();
jump stg_myExit [*]; // all registers live
}
main {
jump stg_foo [];
}
......@@ -8,7 +8,8 @@ setTestOpts(f)
# test('T5486', normal, compile, [''])
test('T5681', normal, compile, [''])
test('T6158', [reqlib('vector'), reqlib('primitive')], compile, ['-package vector -package primitive'])
test('T7571', cmm_src, compile, [''])
test('T7571', cmm_src, compile, ['-no-hs-main'])
test('T7575', unless(wordsize(32), skip), compile, [''])
test('T8131b', normal, compile, [''])
test('T11649', normal, compile, [''])
test('T17920fail', cmm_src, compile_fail, ['-no-hs-main'])
Markdown is supported
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