From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4148 invoked by alias); 4 Jan 2006 10:29:46 -0000 Received: (qmail 4130 invoked by uid 48); 4 Jan 2006 10:29:45 -0000 Date: Wed, 04 Jan 2006 10:29:00 -0000 Subject: [Bug java/25664] New: internal bug in compiler when assigning value to a static final field of java code X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "kz447 at hszk dot bme dot hu" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2006-q1/txt/msg00009.txt.bz2 List-Id: gcj -v: Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/../../../libgcj.spec rename spec lib to liborig Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-13) error output: gcj -C vira/viraNoSpaceException.java gcj -C vira/server/server.java vira/server/server.java: In class `vira.server.server': vira/server/server.java: In method `vira.server.server.accept(java.nio.channels.SocketChannel)': vira/server/server.java:241: internal compiler error: in generate_bytecode_insns, at java/jcf-write.c:1988 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. For Debian GNU/Linux specific bug reporting instructions, see . make: *** [server] Error 1 (5 of 11): internal compiler error: in generate_bytecode_insns, at java/jcf-write.c:1988 Also tried compile with javac, the result: vira/server/server.java:241: cannot assign a value to final variable ember_id ember e=new ember_oszt(ember_id++, jt); ^ Code: public class server { /* statikus mezok */ private static final int hostport=8000; private static final int RECVBUF=2; //egy char-t varunk private static final int SENDBUF=jatekter_oszt.bytebuflen(); private static final int MAXCONNS=4; //hanyan jatszhatnak private static final int REPLY_TIMEOUT=2; //egy kapcsolodo kliensnek meddig probaljon kuldeni private static final int ember_id=0; //egyedi azonosito: mindig egyel no, ahanyszor uj ember jon /* konstruktorok */ public server() { /* jatekmezo inicializalasa */ jt=new jatekter_oszt(); /* server felallitasa */ try { //Create the server socket channel server = ServerSocketChannel.open(); // nonblocking I/O server.configureBlocking(false); // using wildcard address, which means any, specially the local host, and can only be used with bind server.socket().bind(new java.net.InetSocketAddress(hostport)); System.out.println("Server attivo porta "+hostport); // Create the selector selector = Selector.open(); // Recording server to selector (type OP_ACCEPT) server.register(selector, SelectionKey.OP_ACCEPT); } catch(IOException e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(1); } conns=new ArrayList(); emberek=new ArrayList(); regiido=(Calendar.getInstance()).getTimeInMillis(); } /* metodusok */ public void serverloop() { //Infinite server loop for(;;) { try { // Waiting for events (no timeout) selector.select(); } catch(IOException e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(1); } // Get keys Set keys = selector.selectedKeys(); Iterator i = keys.iterator(); // For each keys... while(i.hasNext()) { SelectionKey key = (SelectionKey) i.next(); // Remove the current key i.remove(); try { processSelectionKey(key); //System.out.println("end"); } catch(IOException e) { System.out.println(e.getMessage()); e.printStackTrace(); System.exit(1); } } } } private void processSelectionKey(SelectionKey key) throws IOException { // if isAccetable = true // then a client required a connection // get client socket channel //System.out.println("proc"); if(key.isAcceptable()) { SocketChannel client = server.accept(); if(conns.size()