#1151: small program misbehaves with -fvia-C
-------------------------------------------------+--------------------------
Reporter: Stefan O'Rear <[EMAIL PROTECTED]> | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.7
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Architecture: Multiple | Os: Multiple
-------------------------------------------------+--------------------------
[EMAIL PROTECTED]:/tmp$ mkdir bug
[EMAIL PROTECTED]:/tmp$ cd bug
[EMAIL PROTECTED]:/tmp/bug$ echo 'main = interact $ (show :: Bool -> String)
. read' > bug.hs
[EMAIL PROTECTED]:/tmp/bug$ ghc -fasm bug.hs
[EMAIL PROTECTED]:/tmp/bug$ echo -n False | ./a.out
[EMAIL PROTECTED]:/tmp/bug$ rm *
[EMAIL PROTECTED]:/tmp/bug$ echo 'main = interact $ (show :: Bool -> String)
. read' > bug.hs
[EMAIL PROTECTED]:/tmp/bug$ ghc -fvia-C bug.hs
/tmp/ghc12591_0/ghc12591_0.hc: In function 'rr5_entry':
/tmp/ghc12591_0/ghc12591_0.hc:33:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc:36:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc: In function 'srg_entry':
/tmp/ghc12591_0/ghc12591_0.hc:108:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc:111:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc:115:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc: In function 'Main_main_entry':
/tmp/ghc12591_0/ghc12591_0.hc:153:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc:156:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc: In function 'ZCMain_main_entry':
/tmp/ghc12591_0/ghc12591_0.hc:195:0:
warning: assignment makes integer from pointer without a cast
/tmp/ghc12591_0/ghc12591_0.hc:198:0:
warning: assignment makes integer from pointer without a cast
[EMAIL PROTECTED]:/tmp/bug$ echo -n False | ./a.out
a.out: internal error: stg_ap_p_ret
(GHC version 6.7.20070213 for i386_unknown_linux)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
Aborted
[EMAIL PROTECTED]:/tmp/bug$
The exact error seen depends in a not-yet-characterised way on the
program;
in addition to the above, correct behavior, immediate silent exit, and
"Segmentation fault" have been seen.
Brandon S. Allbery on #haskell was able to reproduce using
powerpc_apple_darwin (20070213)
Lennary Augustsson on #haskell was not, using 20070216 "i386, Mac OS X"
Stefan
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1151>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs