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

Compiler goes into infinite loop

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.1.5
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      generic
    • OS:
      solaris_2.5.1
    • Verification:
      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: