This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21847] New: [4.0/4.1 Regression] misscompiling of the following java code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 May 2005 19:37:59 -0000
- Subject: [Bug middle-end/21847] New: [4.0/4.1 Regression] misscompiling of the following java code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following java code should print PASS but instead it prints FAIL at -O1 and above:
class t
{
public static void test()
{
int i =0;
int j = 1;
int k = j/i;
}
public static void main(String a1[])
{
try {
test();
}catch (ArithmeticException e)
{
System.out.println("Pass");
return;
}
System.out.println("Fail");
}
}
--
Summary: [4.0/4.1 Regression] misscompiling of the following java
code
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21847