Commit 2c6a0411 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

Fix a couple of tests for GHCi/-O* (Trac #10052)

Tests use unboxed types (or optimizer gets to them),
those can't be handled by ghci. Fixed by using -fobject-code.
Signed-off-by: default avatarSergei Trofimovich <>
parent 7c2293a0
......@@ -119,7 +119,8 @@ test('CgStaticPointers',
, when(doing_ghci(), extra_hc_opts('-fobject-code'))
compile_and_run, [''])
test('StaticArraySize', normal, compile_and_run, ['-O2'])
test('StaticArraySize', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
compile_and_run, ['-O2'])
test('StaticByteArraySize', normal, compile_and_run, ['-O2'])
test('CopySmallArray', normal, compile_and_run, [''])
test('CopySmallArrayStressTest', reqlib('random'), compile_and_run, [''])
......@@ -39,7 +39,8 @@ test('T4830',
test('T3245', normal, compile_and_run, ['-O'])
test('T3245', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
compile_and_run, ['-O'])
# Test that bytestring reading/writing isn't over-allocating. We had
# a bug in hGetBufNonBlocking in 6.13 that triggered this.
[when(fast(), skip),
when(doing_ghci(), extra_hc_opts('-fobject-code')),
extra_clean(['Data_Lazy.hi', 'Data_Lazy.o',
'Funcs_Lexer.hi', 'Funcs_Lexer.o',
'Funcs_Parser_Lazy.hi', 'Funcs_Parser_Lazy.o',
......@@ -40,7 +40,8 @@ test('tcrun020', normal, compile_and_run, [''])
test('tcrun021', normal, compile_and_run, ['-package containers'])
test('tcrun022', [omit_ways(['ghci']),only_compiler_types(['ghc'])],
compile_and_run, ['-O'])
test('tcrun023', normal, compile_and_run, ['-O'])
test('tcrun023', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
compile_and_run, ['-O'])
test('tcrun024', normal, compile_and_run, ['-O'])
test('tcrun025', extra_clean(['TcRun025_B.hi', 'TcRun025_B.o']),
multimod_compile_and_run, ['tcrun025',''])
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