I've attached a little module that I created to demonstrate a bug I
found in _casm_GC_. To compile, just use "ghc -fvia-C -fglasgow-exts
test_casm_gc.hs".

Also, for the misspelling, the simplifier states that it is "baling"
instead of "bailing".

I'm using:
The Glorious Glasgow Haskell Compilation System, version 4.00,
patchlevel 0
running on RedHat Linux 5.1 (kernel 2.0.35 on i586)

Thanks,
        Michael Hobbs
import Addr

main = do
  (addr1, addr2) <- return (``NULL'' :: Addr, ``NULL'' :: Addr)
  {- If the following line is used, the problem doesn't show up:
  let (addr1, addr2) = ((``NULL'' :: Addr), (``NULL'' :: Addr))
  -}
  putStr ("_casm_ : should print " ++ show addr1 ++ "\n")
  _casm_
    ``fflush(stdout); printf("%%lu\n", %0); fflush(stdout);''
    addr1 addr2
  putStr ("_casm_GC_ : should print " ++ show addr1 ++ "\n")
  _casm_GC_
    ``fflush(stdout); printf("%%lu\n", %0); fflush(stdout);''
    addr1 addr2
  return ()

Reply via email to