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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      mantis
    • CPU:
      generic, x86
    • OS:
      linux, solaris_8
    • Verification:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: