Compiling with -O yields broken .hc file
When compiling the attached source file (part of
AFrob) with GHC 5.04 under Linux (RH 7.2) and
optimizations turned on, an invalid .hc file is
generated. I'm actually surprised that there is an
.hc file in the first place, since I thought I was
using the native code generator? The generated .hc
file is also included.
The command I use is:
ghc -c -fglasgow-exts -O -package lang -package posix
-package concurrent
-i/usr/local/lib/ghc/imports/hgl:/usr/local/lib/ghc/imports/arrow:/usr/local/lib/ghc/imports/afrp:../Common
-keep-hc-files -o RSWorldGeometry.o RSWorldGeometry.hs
The error message I get is:
RSWorldGeometry.hc: In function `saF6_ret':
RSWorldGeometry.hc:79: invalid lvalue in decrement
RSWorldGeometry.hc:79: parse error before `5.0'
which makes sense if one looks at the C code.
The source module and the generated c file are
included in the form of a gzipped tar file. If you
need the entire context, try our AFRP/AFrob hacker's
pre-release available from www.haskell.org/afrp.
All the best,
/Henrik
--
Henrik Nilsson
Yale University
nilsson@cs.yale.edu
Trac metadata
Trac field |
Value |
Version |
5.04 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
ResolvedFixed |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|