public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39795]  New: Support round-to-zero in Fortran front-end
@ 2009-04-17 11:10 uweigand at gcc dot gnu dot org
  2009-04-21 17:47 ` [Bug fortran/39795] " pinskia at gcc dot gnu dot org
  2010-05-23 19:12 ` dfranke at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: uweigand at gcc dot gnu dot org @ 2009-04-17 11:10 UTC (permalink / raw)
  To: gcc-bugs

On the SPU, all single-precision floating-point arithmetic always
takes place in round-to-zero rounding mode.  The Fortran front-end
always assumes round-to-nearest mode.  This causes a number of issues:

- Both real->string and string->real transformations (e.g. printf, scanf)
  operate in round-to-zero mode.  This means that a round-trip transform
  will often not yield an identical result; this causes e.g. the
  default_format_1.f90 test case to fail.

  It seems this cannot be fixed as the behaviour of printf and scanf
  is specified to follow round-to-zero on the SPU ...

- As a special case of the real->string->real round-trip transform problem,
  the value of GFC_REAL_4_HUGE from the (generated) kinds.h does not convert
  to the largest real when read back in, but its immediate predecessor.
  This causes the scalar_mask_2.f90 test case to fail.

  This can be fixed by using rounding away from zero when generating the
  string constant that is written to the kinds.h file.

- Compile-time operations performed by the Fortran front-end are always
  done in round-to-nearest mode.  This results in different results as
  compared to executing the corresponding operations at run-time.  This
  causes e.g. the integer_exponentiation_3.F90 test case to fail.

  This can be fixed by having the Fortran front-end check the target
  floating format rounding mode, and using this mode to perform
  compile-time operations in.


-- 
           Summary: Support round-to-zero in Fortran front-end
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: uweigand at gcc dot gnu dot org
GCC target triplet: spu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39795


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/39795] Support round-to-zero in Fortran front-end
  2009-04-17 11:10 [Bug fortran/39795] New: Support round-to-zero in Fortran front-end uweigand at gcc dot gnu dot org
@ 2009-04-21 17:47 ` pinskia at gcc dot gnu dot org
  2010-05-23 19:12 ` dfranke at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-21 17:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-04-21 17:46 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-04-21 17:46:49
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39795


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/39795] Support round-to-zero in Fortran front-end
  2009-04-17 11:10 [Bug fortran/39795] New: Support round-to-zero in Fortran front-end uweigand at gcc dot gnu dot org
  2009-04-21 17:47 ` [Bug fortran/39795] " pinskia at gcc dot gnu dot org
@ 2010-05-23 19:12 ` dfranke at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-23 19:12 UTC (permalink / raw)
  To: gcc-bugs



-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39795


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-23 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17 11:10 [Bug fortran/39795] New: Support round-to-zero in Fortran front-end uweigand at gcc dot gnu dot org
2009-04-21 17:47 ` [Bug fortran/39795] " pinskia at gcc dot gnu dot org
2010-05-23 19:12 ` dfranke at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).