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

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

    XMLWordPrintable

Details

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

    Description

      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());
          }
      }

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              gafter Neal Gafter
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: