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

regression: javac crashes when compiling compound string assignment with generics

    Details

    • Subcomponent:
    • Introduced In Build:
      b39
    • Introduced In Version:
      7
    • Resolved In Build:
      b70
    • CPU:
      unknown
    • OS:
      generic
    • Verification:
      Verified

      Description

      Javac crashes When compilin the following simple program:

      class Foo<X> { X x; }
      class Bug {
          public void m(Foo<String> f) {
              f.x += f.x;
          }
      }

      Here's the output:

      /usr/lib/jvm/java-7-openjdk/bin/javac EchoImpl.java -XDverboseCompilePolicy
      [attribute Foo]
      [flow Foo]
      [desugar Foo]
      [generate code Foo]
      [attribute Bug]
      [flow Bug]
      [desugar Bug]
      [generate code Bug]
      An exception has occurred in the compiler (1.7.0-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
      java.lang.AssertionError: store unsupported: stack(object)
      at com.sun.tools.javac.jvm.Items$Item.store(Items.java:212)
      at com.sun.tools.javac.jvm.Items$AssignItem.drop(Items.java:715)
      at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1628)
      at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1145)
      at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)
      at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:718)
      at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:704)
      at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:755)
      at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1030)
      at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:768)
      at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)
      at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:718)
      at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:911)
      at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:884)
      at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:655)
      at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:683)
      at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2269)
      at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:695)
      at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1372)
      at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1340)
      at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:848)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:810)
      at com.sun.tools.javac.main.Main.compile(Main.java:400)
      at com.sun.tools.javac.main.Main.compile(Main.java:318)
      at com.sun.tools.javac.main.Main.compile(Main.java:309)
      at com.sun.tools.javac.Main.compile(Main.java:82)
      at com.sun.tools.javac.Main.main(Main.java:67)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mcimadamore Maurizio Cimadamore
                Reporter:
                mcimadamore Maurizio Cimadamore
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: