Skip to content

Test case T19381 fails with optimizations

Summary

Similar to #21977 and #21968 (closed), test case rts/T19381 works without optimizations and fails with, using NCG.

(Note, this can be replicated by compiling by hand or using the --test-way=optasm, which is how I found this)

Expected

~/myghc/ghc/_build/stage1/bin/ghc T19381.hs && T19381 +RTS -T -RTS

Prints nothing, exit code 0.

Error

Add -O:

~/myghc/ghc/_build/stage1/bin/ghc -O T19381.hs && T19381 +RTS -T -RTS

T19381: Additional memory is retained: 0/7 CallStack (from HasCallStack): error, called at T19381.hs:29:8 in main:Main

Environment

Compiler used: current main HEAD. OS: Ubuntu Linux 20.04 Platform: x86_64

Edited by Benjamin Maurer
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information