code generator fails to assign a register to a var with an unreachable def

XMLWordPrintable

    • mantis
    • generic, x86
    • linux, solaris_8
    • Verified

      javac compiles the following to unverifiable code:


      class T {
          public static void main(String[] args) {
              switch (args.length) {
              case 1:
                  if (true)
                      break;
                  int i = 1;
              case 0:
                  i = 2;
                  System.out.print(i + " ");
              }
              System.out.print(args.getClass().getName());
          }
      }

            Assignee:
            Neal Gafter (Inactive)
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: