Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4090200

Compiler goes into infinite loop

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1
    • 1.1.5
    • 1.1.3
    • tools
    • None
    • 1.1.5
    • generic
    • solaris_2.5.1
    • Verified

    Description

      If you try to compile the following program, javac goes into an infinite loop.

      public class test {

        public static class Inner {

          private int local1;

          test local2;

          public static final int local3 = 0;

          public void local4() {
            local2.local5();
          }

        }

        /* Making local5 public makes the problem (of javac looping) go away */

        private void local5() { }

        void local6() {
          Inner local7 = null;
          int x = 0;
          byte b = 2;
          byte z = (x == 0) ? Inner.local3 : b;
          x = local7.local1 + t1.f(0, x);
        }

      }

      class t1 {

        static int f(int x, int y) { return x + y; }

      }


      If you make a the specified field public, the compilation terminates.

      Attachments

        Activity

          People

            dstoutamsunw David Stoutamire (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: