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/llvm | |
parent | 5f6a0665512717271ac2b249d107e2a0cb18ae86 (diff) | |
download | haskell-cad62ef11972490b180fad3cd4a5c7754fa218e4.tar.gz |
Add tests for #17920
Metric Decrease:
T12150
T12234
Diffstat (limited to 'testsuite/tests/llvm')
-rw-r--r-- | testsuite/tests/llvm/should_compile/T17920fail.cmm | 35 | ||||
-rw-r--r-- | testsuite/tests/llvm/should_compile/all.T | 3 |
2 files changed, 37 insertions, 1 deletions
diff --git a/testsuite/tests/llvm/should_compile/T17920fail.cmm b/testsuite/tests/llvm/should_compile/T17920fail.cmm new file mode 100644 index 0000000000..d070cfcd7a --- /dev/null +++ b/testsuite/tests/llvm/should_compile/T17920fail.cmm @@ -0,0 +1,35 @@ +#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 []; +} + diff --git a/testsuite/tests/llvm/should_compile/all.T b/testsuite/tests/llvm/should_compile/all.T index fedf5ac96c..dca858dec8 100644 --- a/testsuite/tests/llvm/should_compile/all.T +++ b/testsuite/tests/llvm/should_compile/all.T @@ -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']) |