public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/4522] New: SH- Mathematical Error handling is no working for valid code
@ 2007-05-18 12:32 dilip dot ramesh at kpitcummins dot com
  2007-05-23  3:55 ` [Bug math/4522] " kkojima at rr dot iij4u dot or dot jp
  0 siblings, 1 reply; 2+ messages in thread
From: dilip dot ramesh at kpitcummins dot com @ 2007-05-18 12:32 UTC (permalink / raw)
  To: glibc-bugs

Hello all,                        

I have successfully built SH4-Linux toolchain based on              
(binutils-2.17, gcc-4.2-20061205, glibc-2.5) for Renesas SH 
target.             

I am facing problem while executing the following C++ 
program.                  

 ------------------------------------------------------------------     
 #include <stdio.h>
 #include <cmath>
 #include <cerrno>

 double  value;

 int main( void )
 {
         value = sqrt(-1.2);
         if (errno != EDOM) {
                 printf("sqrt: GOT %f\n", value);
         }
 }

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

The above program compiles successfully with the sh4-linux 
toolchain.           
While executing on target platform "sqrt" function is returning "nan" but     
"errno" variable is not set to "EDOM".
Command: sh4-linux-gcc <name> {here default target is m4}

Observations:                

1. When the above program is compiled with "-m4-nofpu" target option  or with
   any other FPU less target option program executes successfully and the 
   "errno" variable is set to "EDOM".
   Command: sh4-linux-gcc -m4-nofpu <name>

Is there any relation with the target processor (i.e. floating point unit
processor or non - floating point unit processor)?  Because the only difference
between success and failure condition in our case is the target switch we are
specifying (m4-nofpu or m4 respectively ).

Any help on this will be appreciated.                    

Regards,                       
Dilip Malinur Ramesh              
KPIT Cummins Infosystems Ltd,             
Pune (INDIA)                 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
Free download of GNU based SH-Linux toolchains for Renesas' SH 
Series.          
The following site also offers free technical support to its 
users.             
Visit http://www.kpitgnutools.com for details.                                
Latest versions of KPIT GNU SH-Linux tools were released on April 5, 
2007.      
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
           Summary: SH- Mathematical Error handling is no working for valid
                    code
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: critical
          Priority: P3
         Component: math
        AssignedTo: aj at suse dot de
        ReportedBy: dilip dot ramesh at kpitcummins dot com
                CC: dilip dot ramesh at kpitcummins dot com,glibc-bugs at
                    sources dot redhat dot com
 GCC build triplet: i686-pc-linux
  GCC host triplet: sh4-unknown-linux
GCC target triplet: sh4-unknown-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=4522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug math/4522] SH- Mathematical Error handling is no working for valid code
  2007-05-18 12:32 [Bug math/4522] New: SH- Mathematical Error handling is no working for valid code dilip dot ramesh at kpitcummins dot com
@ 2007-05-23  3:55 ` kkojima at rr dot iij4u dot or dot jp
  0 siblings, 0 replies; 2+ messages in thread
From: kkojima at rr dot iij4u dot or dot jp @ 2007-05-23  3:55 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From kkojima at rr dot iij4u dot or dot jp  2007-05-23 04:55 -------
This is not a glibc problem.  You need -mieee or -fno-finite-math-only
as a gcc option on this target.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kkojima at rr dot iij4u dot
                   |                            |or dot jp
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
            Summary|SH- Mathematical Error      |SH- Mathematical Error
                   |handling is no working for  |handling is no working for
                   |valid code                  |valid code


http://sourceware.org/bugzilla/show_bug.cgi?id=4522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2007-05-23  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-18 12:32 [Bug math/4522] New: SH- Mathematical Error handling is no working for valid code dilip dot ramesh at kpitcummins dot com
2007-05-23  3:55 ` [Bug math/4522] " kkojima at rr dot iij4u dot or dot jp

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).