coredump on innocent code

[email protected]
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <20050908160047.GA27929@droog>
Hello.

$ cat bug.hs
main = print (let (x,(q,_)) = (1,divMod x x) in q)
$ runhugs bug.hs
Illegal instruction (core dumped)
$ md5 hugs98-Mar2005-patched.tar.gz
MD5 (hugs98-Mar2005-patched.tar.gz) = f72c378251f0d488fff9871583d26843
$ uname -a
NetBSD droog 2.0.2_STABLE NetBSD 2.0.2_STABLE (sdf) #0: Sun Jun 12 15:36:54 UTC 2005  root@vinland:/var/netbsd/arch/alpha/compile/sdf alpha
$ cat workaround1.hs
main = print (let x = 1
                  (q,_) = divMod x x in q)
$ runhugs workaround1.hs
1
$ cat workaround2.hs
main = print (let (x,(q,_)) = (1,dm x x) in q)
dm a b = (div a b,mod a b)
$ runhugs workaround2.hs
1
$ 

Thank you for making hugs freely and libre available.

fool at sdf-eu.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.