This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/33570] New: Just tried to compile a java source code with gcc java

samadhi@localhost:[Receiver]$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

samadhi@localhost:[Receiver]$ uname -a
Linux localhost 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 GNU/Linux

samadhi@localhost:[Receiver]$ gcc internal compiler error: in uses_jv_markobj_p, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.


import java.util.*;


class DataFrame {

        byte type; // 1 - data, 2 - ack.

        byte num; // 0, 1.
        byte dataLen;
        byte[] data;

        static byte[] frameDataToByte(byte type, byte num, byte[] data) {
                byte[] tmp = new byte[3 + data.length];
                tmp[0] = type;
                tmp[1] = num;
                tmp[2] = (byte)data.length;
                for(int i = 0; i < data.length; i++)
                        tmp[3 + i] = data[i];
                return tmp;

        static DataFrame byteToFrame(byte[] data) {
                DataFrame d = new DataFrame();
                d.type = data[0];
                d.num = data[1];
                d.dataLen = data[2];

       = new byte[d.dataLen];
                for(int i = 0; i < data.length; i++)
              [i] = data[3 + i];
                return d;

public class Receiver {
        static int cp = 1;
        static BufferedReader ir = new BufferedReader(new
        static int ourPort = 1789;

        public static void main (String[] args) throws Exception {

        static void receiver() throws Exception {
                System.out.println("Receiver started.");

                DatagramSocket ds = new DatagramSocket(ourPort);

                int n = 0;
                byte[] b1 = new byte[200];
                while(true) {
                        DatagramPacket dp1 = new DatagramPacket(b1, b1.length);
                        try {
                        catch(IOException e) {

                        System.out.println("Receiver: Packet received.");

                        DataFrame d1 = DataFrame.byteToFrame(b1);
                        if(d1.num != n)
                                continue; // Invalid frame number.


                        byte[] data = new String("Acknowledge " +
                        byte[] b2 = DataFrame.frameDataToByte((byte)2, (byte)n,
                        DatagramPacket dp2 = new DatagramPacket(b2, b2.length,
dp1.getAddress(), dp1.getPort());

                        try {
                        catch(IOException e) {

                        n = (n == 1) ? 0 : 1;

        static void toNetworkLayer(byte[] data) throws Exception {
                System.out.println("Received message " + cp + ":");
                System.out.println(new String(data));

           Summary: Just tried to compile a java source code with gcc java
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: black dot uprise at gmail dot com
  GCC host triplet: All in msg body

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]