Re: [GHC] #952: gcc should be passed the -fwrapv flag

2007-01-16 Thread GHC
#952: gcc should be passed the -fwrapv flag
--+-
 Reporter:  simonmar  |  Owner:  igloo   
 Type:  merge | Status:  closed  
 Priority:  normal|  Milestone:  6.6.1   
Component:  Compiler  |Version:  6.6 
 Severity:  normal| Resolution:  fixed   
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Multiple
   Os:  Multiple  |  
--+-
Changes (by igloo):

  * resolution:  => fixed
  * status:  new => closed

Comment:

 Merged to the 6.6 branch.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #952: gcc should be passed the -fwrapv flag

2007-01-15 Thread GHC
#952: gcc should be passed the -fwrapv flag
--+-
 Reporter:  simonmar  |  Owner:  igloo   
 Type:  merge | Status:  new 
 Priority:  normal|  Milestone:  6.6.1   
Component:  Compiler  |Version:  6.6 
 Severity:  normal| Resolution:  
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Multiple
   Os:  Multiple  |  
--+-
Changes (by igloo):

  * type:  bug => merge

Comment:

 Fixed in the HEAD by

 {{{
 Mon Jan 15 19:42:50 GMT 2007  Ian Lynagh <[EMAIL PROTECTED]>
   * Give -fwrapv to gcc when it supports it
   Fixes trac #952: Haskell requires consistent overflow behaviour, which
   gcc doesn't give without this flag.
 }}}

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #952: gcc should be passed the -fwrapv flag

2007-01-15 Thread GHC
#952: gcc should be passed the -fwrapv flag
--+-
 Reporter:  simonmar  |  Owner:  igloo   
 Type:  bug   | Status:  new 
 Priority:  normal|  Milestone:  6.6.1   
Component:  Compiler  |Version:  6.6 
 Severity:  normal| Resolution:  
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Multiple
   Os:  Multiple  |  
--+-
Changes (by igloo):

  * status:  reopened => new
  * owner:  => igloo

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #952: gcc should be passed the -fwrapv flag

2006-10-23 Thread GHC
#952: gcc should be passed the -fwrapv flag
--+-
 Reporter:  simonmar  |  Owner:  
 Type:  bug   | Status:  reopened
 Priority:  normal|  Milestone:  6.6.1   
Component:  Compiler  |Version:  6.6 
 Severity:  normal| Resolution:  
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Multiple
   Os:  Multiple  |  
--+-
-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #952: gcc should be passed the -fwrapv flag

2006-10-23 Thread GHC
#952: gcc should be passed the -fwrapv flag
--+-
 Reporter:  simonmar  |  Owner:  
 Type:  bug   | Status:  reopened
 Priority:  normal|  Milestone:  6.6.1   
Component:  Compiler  |Version:  6.6 
 Severity:  normal| Resolution:  
 Keywords:| Difficulty:  Unknown 
 Testcase:|   Architecture:  Multiple
   Os:  Multiple  |  
--+-
Changes (by simonmar):

  * resolution:  fixed =>
  * summary:  Floating point exception building HEAD with 6.6 => gcc should
  be passed the -fwrapv flag
  * status:  closed => reopened

Comment:

 re-opening.  After giving this some more thought, I realised that the
 Haskell report's meaning of "undefined" is different from the C language
 specification's meaning of "undefined", and that in fact `ghc -fvia-C` is
 behaving incorrectly here.

 Overflow of `Int` should return either `_|_` or an implementation-defined
 value, according to the Haskell report.  In the code affected by this bug,
 we were returning an implementation-defined value (2's complement
 wrapping) but a subsequent test on the value was returning an inconsistent
 answer; this is allowed by the C spec, but not by Haskell.

 The upshot is that I believe we should invoke gcc with `-fwrapv` where it
 is supported (gcc 3.4+).  This is more than required: it forces 2's
 complement wrapping behviour, but prevents the illegal optimisations that
 give rise to this bug.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs