]> source.dussan.org Git - aspectj.git/commitdiff
test and fix for 166084: istore incorrectly optimized
authoraclement <aclement>
Wed, 29 Nov 2006 13:43:03 +0000 (13:43 +0000)
committeraclement <aclement>
Wed, 29 Nov 2006 13:43:03 +0000 (13:43 +0000)
tests/bugs160/pr166084/Simple.java [new file with mode: 0644]
tests/bugs160/pr166084/X.java [new file with mode: 0644]
tests/bugs160/pr166084/simple.jar [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml

diff --git a/tests/bugs160/pr166084/Simple.java b/tests/bugs160/pr166084/Simple.java
new file mode 100644 (file)
index 0000000..c5992b4
--- /dev/null
@@ -0,0 +1,14 @@
+public class Simple {
+  public static void main(String []argv) {
+    new Simple().m();
+  }
+
+  public void m() {
+    int i = 1;
+    System.out.println(i);
+  }
+}
+
+aspect X {
+  before(): call(* println(..)) {}
+}
diff --git a/tests/bugs160/pr166084/X.java b/tests/bugs160/pr166084/X.java
new file mode 100644 (file)
index 0000000..e60c2c3
--- /dev/null
@@ -0,0 +1,3 @@
+aspect X {
+  before(): call(* println(..)) {}
+}
diff --git a/tests/bugs160/pr166084/simple.jar b/tests/bugs160/pr166084/simple.jar
new file mode 100644 (file)
index 0000000..3151ded
Binary files /dev/null and b/tests/bugs160/pr166084/simple.jar differ
index 5b22d171784c05e181c02a8ddb9db779eff7b746..d3c343b118ee82b4b158e1ca14d6faf220c40d68 100644 (file)
@@ -22,7 +22,7 @@ import junit.framework.Test;
 public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
   public void testGenericFieldNPE_pr165885() { runTest("generic field npe");}
-
+  public void testIncorrectOptimizationOfIstore_pr166084() { runTest("incorrect optimization of istore"); }
  
   /////////////////////////////////////////
   public static Test suite() {
index 2e12408fa79380253bc59d91c9976580b99717a7..a89a809492975c1ea134a5f4fd2166035d028e28 100644 (file)
          </compile>
     </ajc-test>
     
+    <ajc-test dir="bugs160/pr166084" title="incorrect optimization of istore">
+      <compile files="X.java" inpath="simple.jar"/>
+         <run class="Simple"/>
+    </ajc-test>
+    
     
  <!-- second section - need a 1.6 vm -->