Bugs item #617082, was opened at 2002-10-01 15: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: Closed
>Resolution: Duplicate
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]


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

>Comment By: Simon Marlow (simonmar)
Date: 2002-10-14 12:47

Message:
Logged In: YES 
user_id=48280

This was fixed in 5.04.1 (also reported in #604849).

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

Comment By: Sven Panne (spanne)
Date: 2002-10-03 12:23

Message:
Logged In: YES 
user_id=50298

I've tested it with 5.02.3, 5.04.1 and the CVS HEAD and it
works fine in all cases (i.e.the literal is correctly
wrapped into parentheses). Which version are you using exactly?

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

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