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

C2: 8275201 broke constant folding of array store check in some cases

    XMLWordPrintable

Details

    • b05

    Backports

      Description

        Following test case fails:

        public class TestArrayElementTypeLoad {
            public static void main(String[] args) {
                TestFramework.run();
            }

            static final A[] array = new A[1];

            @Test
            @IR(phase = { CompilePhase.ITER_GVN1 }, failOn = { IRNode.SUBTYPE_CHECK })
            public static void test1(A a) {
                array[0] = a;
            }

            @Run(test = "test1")
            private void test1Runner() {
                test1(new A());
                test1(new B());
            }

            static class A {
            }

            static class B extends A {
            }
        }

        Attachments

          Issue Links

            Activity

              People

                roland Roland Westrelin
                roland Roland Westrelin
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: