[Bug java/19070] internal compiler error: in generate_bytecode_conditional, at java/jcf-write.c:1271

2004-12-18 Thread dan at bolser dot co dot uk

--- Additional Comments From dan at bolser dot co dot uk  2004-12-18 19:12 
---
I also get the exact same behaviour using...

gcc -v 
Reading specs from /usr/share/gcc-4.0b/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/usr/share/gcc-4.0b 
--enable-java-awt=gtk
Thread model: posix
gcc version 4.0.0 20041217 (experimental)

Trying to compile this code...

public class testish {
public static void main (String args[]){
Number pang = null;
double pong = pang.doubleValue();
if (pong != null){
System.out.println("well...");
}
}
}

/usr/share/gcc-4.0b/bin/gcj -C testish.java
testish.java: In class 'testish':
testish.java: In method 'testish.main(java.lang.String[])':
testish.java:5: internal compiler error: in generate_bytecode_conditional, at
java/jcf-write.c:1271


I guess this should compile, as not testing for the null causes a run time null
pointer exception (as shown in comment #2)

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19070


[Bug java/19070] internal compiler error: in generate_bytecode_conditional, at java/jcf-write.c:1271

2004-12-18 Thread dan at bolser dot co dot uk

--- Additional Comments From dan at bolser dot co dot uk  2004-12-18 19:07 
---
The following code...

public class testish {
public static void main (String args[]){
Number pang = null;
double pong = pang.doubleValue();
if (pong != 0){
System.out.println("well...");
}
}
}

Causes a runtime null pointer exception... 

Exception in thread "main" java.lang.NullPointerException
   at testish.main(java.lang.String[]) (Unknown Source)

I guess it should be a compile time error, although I don't know.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19070


[Bug java/19070] New: internal compiler error: in generate_bytecode_conditional, at java/jcf-write.c:1271

2004-12-18 Thread dan at bolser dot co dot uk
internal compiler error: in generate_bytecode_conditional, at 
java/jcf-write.c:1271

Some specific syntax (see below) in the java prog I am trying to compile causes
the above error...

Here are my details...

/usr/share/gcc-4.0a/bin/gcc -v
Reading specs from /usr/share/gcc-4.0a/lib/gcc/i686-pc-linux-gnu/4.0.0/specs
Configured with: ../gcc/configure --prefix=/usr/share/gcc-4.0a 
--enable-java-awt=gtk
Thread model: posix
gcc version 4.0.0 20041130 (experimental)


uname -a
Linux bleah.com 2.6.9-1.6_FC2 #1 Thu Nov 18 22:03:19 EST 2004 i686 athlon i386
GNU/Linux

Compiled using... gcj -C


The bug is triggered by the following code example...

public class testish {
public void test (){
Number ping = (Number) new Integer(10);
double pong = ping.doubleValue();
if (pong != null){   <-- Line 5
System.out.println("well...");
}
}
}


/usr/share/gcc-4.0a/bin/gcj -C testish.java
testish.java: In class 'testish':
testish.java: In method 'testish.test()':
testish.java:5: internal compiler error: in generate_bytecode_conditional, at
java/jcf-write.c:1271
Please submit a full bug report,

I haven't tried to compile with JDK.

-- 
   Summary: internal compiler error: in
generate_bytecode_conditional, at java/jcf-write.c:1271
   Product: gcc
   Version: 4.0.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dan at bolser dot co dot uk
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19070