diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-05 20:36:41 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-23 22:48:18 -0400 |
commit | cad62ef11972490b180fad3cd4a5c7754fa218e4 (patch) | |
tree | e510c5ff00afe23a31d8dcd6c1894d3fdfa39a88 /testsuite/tests/codeGen/should_run | |
parent | 5f6a0665512717271ac2b249d107e2a0cb18ae86 (diff) | |
download | haskell-cad62ef11972490b180fad3cd4a5c7754fa218e4.tar.gz |
Add tests for #17920
Metric Decrease:
T12150
T12234
Diffstat (limited to 'testsuite/tests/codeGen/should_run')
-rw-r--r-- | testsuite/tests/codeGen/should_run/T17920.cmm | 28 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/T17920.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 |
3 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/T17920.cmm b/testsuite/tests/codeGen/should_run/T17920.cmm new file mode 100644 index 0000000000..2cfe5eb92a --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T17920.cmm @@ -0,0 +1,28 @@ +#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); diff --git a/testsuite/tests/codeGen/should_run/T17920.stdout b/testsuite/tests/codeGen/should_run/T17920.stdout new file mode 100644 index 0000000000..345e6aef71 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T17920.stdout @@ -0,0 +1 @@ +Test diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 4a70914bb0..bfe8c5b0d2 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -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, ['']) |