Bugs item #617082, was opened at 2002-10-01 08:47
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=617082&group_id=8032

Category: Compiler
Group: 5.04
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ghc -O generates faulty c code

Initial Comment:
I have the following file:

Bug.hs
--------------------------
module Bug where

foo :: Double -> Double
foo x = x - (-1.0) 
--------------------------

> ghc -c -O Bug.hs
/tmp/ghc25320.hc: In function `s3Ny_ret':
/tmp/ghc25320.hc:14: invalid lvalue in decrement
/tmp/ghc25320.hc:14: parse error before `1.0'

Cause
-----

The problem is the following generated c snippet

_s3Nx_=PK_DBL((W_*)(R1.p+1))--1.0;

The two consecutive minuses should be separated by a
space.

Ulf Norell
[EMAIL PROTECTED]


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=108032&aid=617082&group_id=8032
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to