comp.lang.ada
 help / color / mirror / Atom feed
* Floating-point problems with gcc 3.2
@ 2002-12-11 13:26 Dr Steve Sangwine
  2002-12-11 18:15 ` Stephen Leake
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Dr Steve Sangwine @ 2002-12-11 13:26 UTC (permalink / raw)


I have been trying out gcc 3.2 in order to link Fortran code with Ada
and I have encountered problems with floating point. Ada code that
works correctly with gnat 3.14p and 3.15p gives incorrect numeric
values when compiled with gcc 3.2. I'm using the mingw binaries of gcc
3.2 running on Windows 2000.

I have also seen problems with Fortran code giving incorrect
floating-point results. I seem to recall seeing somewhere something
about a known problem with the floating-point unit not being properly
initialised or reloaded on a context switch. Has anyone else hit this
problem?

Steve Sangwine




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

* Re: Floating-point problems with gcc 3.2
  2002-12-11 13:26 Floating-point problems with gcc 3.2 Dr Steve Sangwine
@ 2002-12-11 18:15 ` Stephen Leake
  2002-12-11 18:19 ` Jerry van Dijk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Leake @ 2002-12-11 18:15 UTC (permalink / raw)


sjs@essex.ac.uk (Dr Steve Sangwine) writes:

> I seem to recall seeing somewhere something
> about a known problem with the floating-point unit not being
> properly initialised or reloaded on a context switch. Has anyone
> else hit this problem?

Try  GNAT.Float_Control.Reset. You need to do this on each DLL
entry, or any time you think the FPU settings might have been changed. 

-- 
-- Stephe



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

* Re: Floating-point problems with gcc 3.2
  2002-12-11 13:26 Floating-point problems with gcc 3.2 Dr Steve Sangwine
  2002-12-11 18:15 ` Stephen Leake
@ 2002-12-11 18:19 ` Jerry van Dijk
  2002-12-11 18:54 ` Ted Dennison
  2002-12-12  8:50 ` nicolas
  3 siblings, 0 replies; 5+ messages in thread
From: Jerry van Dijk @ 2002-12-11 18:19 UTC (permalink / raw)



sjs@essex.ac.uk (Dr Steve Sangwine) writes:

> I have been trying out gcc 3.2 in order to link Fortran code with Ada
> and I have encountered problems with floating point. Ada code that
> works correctly with gnat 3.14p and 3.15p gives incorrect numeric
> values when compiled with gcc 3.2. I'm using the mingw binaries of gcc
> 3.2 running on Windows 2000.

Linking with FORTRAN is indeed one of the area's I am not testing at
the moment. Please report this problem (see www.mingw.org). If possible
please include some test code (Ada and g77 FORTRAN).

-- 
--  Jerry van Dijk   | email: jvandyk@attglobal.net
--  Leiden, Holland  | web:   users.ncrvnet.nl/gmvdijk



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

* Re: Floating-point problems with gcc 3.2
  2002-12-11 13:26 Floating-point problems with gcc 3.2 Dr Steve Sangwine
  2002-12-11 18:15 ` Stephen Leake
  2002-12-11 18:19 ` Jerry van Dijk
@ 2002-12-11 18:54 ` Ted Dennison
  2002-12-12  8:50 ` nicolas
  3 siblings, 0 replies; 5+ messages in thread
From: Ted Dennison @ 2002-12-11 18:54 UTC (permalink / raw)


sjs@essex.ac.uk (Dr Steve Sangwine) wrote in message news:<3df73bcc.15483884@news.essex.ac.uk>...
> I have been trying out gcc 3.2 in order to link Fortran code with Ada
> and I have encountered problems with floating point. Ada code that
...
> I have also seen problems with Fortran code giving incorrect
> floating-point results. I seem to recall seeing somewhere something
> about a known problem with the floating-point unit not being properly
> initialised or reloaded on a context switch. Has anyone else hit this
> problem?

The place to look for this information would be the gcc mailing list,
archived at http://gcc.gnu.org/ml/gcc/ .

If there's a known problem in something as pervasive as
floating-point, it will surely have been discussed there.



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

* Re: Floating-point problems with gcc 3.2
  2002-12-11 13:26 Floating-point problems with gcc 3.2 Dr Steve Sangwine
                   ` (2 preceding siblings ...)
  2002-12-11 18:54 ` Ted Dennison
@ 2002-12-12  8:50 ` nicolas
  3 siblings, 0 replies; 5+ messages in thread
From: nicolas @ 2002-12-12  8:50 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

Gnat in gcc 3.1 and 3.2 is known to be very unstable.
Its main purpose seems to be good enough to be able to build higher versions
of Gnat

the situation is much better in 3.3 (but still expect more bugs than in Gnat
3.15p)
I would forget to use 3.1 or 3.2 for other purpose than building 3.3

You can wait for 3.3 version or try the experimental Gnat 3.3
http://prdownloads.sf.net/mingw/gnatgcc-3.3-exp-20021006.tar.gz
http://prdownloads.sf.net/mingw/gnatgcc-3.3-exp-20021006-notes.txt.gz

You can also try to build 3.3 yourself, but it is not so easy, especially
because mingw32 support is poor in the official FSF tree, and source files
have to be patched for this platform


"Dr Steve Sangwine" <sjs@essex.ac.uk> a �crit dans le message de news:
3df73bcc.15483884@news.essex.ac.uk...
> I have been trying out gcc 3.2 in order to link Fortran code with Ada
> and I have encountered problems with floating point. Ada code that
> works correctly with gnat 3.14p and 3.15p gives incorrect numeric
> values when compiled with gcc 3.2. I'm using the mingw binaries of gcc
> 3.2 running on Windows 2000.
>
> I have also seen problems with Fortran code giving incorrect
> floating-point results. I seem to recall seeing somewhere something
> about a known problem with the floating-point unit not being properly
> initialised or reloaded on a context switch. Has anyone else hit this
> problem?
>
> Steve Sangwine
>





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

end of thread, other threads:[~2002-12-12  8:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11 13:26 Floating-point problems with gcc 3.2 Dr Steve Sangwine
2002-12-11 18:15 ` Stephen Leake
2002-12-11 18:19 ` Jerry van Dijk
2002-12-11 18:54 ` Ted Dennison
2002-12-12  8:50 ` nicolas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox