diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-12-07 08:47:16 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-21 01:46:00 -0500 |
commit | 5ff47ff5bb815e18e03fab42ffae7d735ea70976 (patch) | |
tree | a866f6b824ff746bc3837cfb5b74d0636ace6ae7 /testsuite/tests/codeGen/should_fail/all.T | |
parent | 887d8b4c409c06257a63751e4e84c86ddf5cc874 (diff) | |
download | haskell-5ff47ff5bb815e18e03fab42ffae7d735ea70976.tar.gz |
codeGen: Introduce flag to bounds-check array accesses
Here we introduce code generator support for instrument array primops
with bounds checking, enabled with the `-fcheck-prim-bounds` flag.
Introduced to debug #20769.
Diffstat (limited to 'testsuite/tests/codeGen/should_fail/all.T')
-rw-r--r-- | testsuite/tests/codeGen/should_fail/all.T | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_fail/all.T b/testsuite/tests/codeGen/should_fail/all.T index 67015e46a8..01a4802d09 100644 --- a/testsuite/tests/codeGen/should_fail/all.T +++ b/testsuite/tests/codeGen/should_fail/all.T @@ -4,3 +4,15 @@ # memcpy operations test('T8131', [cmm_src, only_ways(llvm_ways)], compile_fail, ['-no-hs-main']) +def check_bounds_test(name): + """ A -fcheck-prim-bounds test that is expected to fail. """ + test(name, + [ignore_stderr, exit_code(3 if opsys('mingw32') else 134)], + compile_and_run, ['-fcheck-prim-bounds']) + +check_bounds_test('CheckBoundsWriteArray') +check_bounds_test('CheckBoundsIndexArray') +check_bounds_test('CheckBoundsReadInt8Array') +check_bounds_test('CheckBoundsReadWord8ArrayAsInt32') +check_bounds_test('CheckBoundsCopyByteArray') + |