public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Divide by zero works on ia64!!!
@ 2005-05-09 15:23 Khalid Aziz
  2005-05-09 15:56 ` Andreas Schwab
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Khalid Aziz @ 2005-05-09 15:23 UTC (permalink / raw)
  To: linux-ia64

Following program causes floating point exception on x86 (compiled with
gcc 3.3.5 (Debian 1:3.3.5-8)) as expected, but runs fine on ia64 when
compiled with gcc (GCC) 3.3.5 (Debian 1:3.3.5-8).

main()
{
        int a, b;

        a = b = 0;
        printf("a = %d, b = %d, a/b = %d\n", a, b, a/b);
        a = 1;
        b = 0;
        printf("a = %d, b = %d, a/b = %d\n", a, b, a/b);
}

Here is what I get on a machine running 2.6.10 kernel:

# ./tst
a = 0, b = 0, a/b = 0
a = 1, b = 0, a/b = 0

Someone else tried Intel compiler and it generated code that caused
floating point exception as it should.

Something is busted in gcc.

-- 
Khalid

==================================
Khalid Aziz                       Open Source and Linux Organization
(970)898-9214                                        Hewlett-Packard
khalid.aziz@hp.com                                  Fort Collins, CO

"The Linux kernel is subject to relentless development" 
                                - Alessandro Rubini


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

end of thread, other threads:[~2005-05-11 18:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-09 15:23 Divide by zero works on ia64!!! Khalid Aziz
2005-05-09 15:56 ` Andreas Schwab
2005-05-09 20:37 ` Gerald Pfeifer
2005-05-09 21:25 ` Khalid Aziz
2005-05-09 21:54 ` Gerald Pfeifer
2005-05-11 18:36 ` James E Wilson

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