public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/6411: Division by zero may not raise exception on Linux/X86
@ 2002-10-07  0:15 rth
  0 siblings, 0 replies; 3+ messages in thread
From: rth @ 2002-10-07  0:15 UTC (permalink / raw)
  To: Hans_Boehm, gcc-bugs, gcc-prs, nobody, tromey

Synopsis: Division by zero may not raise exception on Linux/X86

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Mon Oct  7 00:15:20 2002
State-Changed-Why:
    Fixed.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6411


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

* Re: optimization/6411: Division by zero may not raise exception on Linux/X86
@ 2002-10-06 21:36 Andrew Pinski
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2002-10-06 21:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR optimization/6411; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: Hans_Boehm@hp.com, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   tromey@redhat.com, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: optimization/6411: Division by zero may not raise exception on Linux/X86
Date: Sun, 6 Oct 2002 21:32:54 -0700

 This has been at least been fixed for 3.3(gcc version 3.3 20021003  
 (experimental)).
 
 Thanks,
 Andrew Pinski
 PS Just looking through the bug database and bugs I have marked I  
 wanted to try to fix.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=6411
 


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

* optimization/6411: Division by zero may not raise exception on Linux/X86
@ 2002-04-22 15:36 Hans_Boehm
  0 siblings, 0 replies; 3+ messages in thread
From: Hans_Boehm @ 2002-04-22 15:36 UTC (permalink / raw)
  To: gcc-gnats; +Cc: tromey


>Number:         6411
>Category:       optimization
>Synopsis:       Division by zero may not raise exception on Linux/X86
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 22 15:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Hans_Boehm@hp.com
>Release:        Gcc pre3.1
>Organization:
>Environment:
Linux/X86
>Description:
A division by zero can be eliminated by the gcc optimizer.
This is incorrect for Java code, since it should still 
raise an exception.  This causes SPECjbb, for example,
to fail with gcj on X86.

This doesn't seem to be an issue on IA64, probably because
a divide routine is always called?
>How-To-Repeat:
[hboehm@hoh ~/java]$ cat divtest2.java
public class divtest2 {
    public static void main(String argv[])
    {
	int a = -10;
	int b = 0;
	try {
	  a = a/b;
	  System.out.println("Failed to throw it");
	} catch (java.lang.Exception x) {
	  System.out.println("Caught it");
	}
    }
}
[hboehm@hoh ~/java]$ gcj divtest2.java --main=divtest2
[hboehm@hoh ~/java]$ ./a.out
Caught it
[hboehm@hoh ~/java]$ gcj -O2 divtest2.java --main=divtest2
[hboehm@hoh ~/java]$ ./a.out
Failed to throw it
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-10-07  7:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-07  0:15 optimization/6411: Division by zero may not raise exception on Linux/X86 rth
  -- strict thread matches above, loose matches on Subject: below --
2002-10-06 21:36 Andrew Pinski
2002-04-22 15:36 Hans_Boehm

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