diff options
author | aclement <aclement> | 2006-11-29 13:43:03 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-11-29 13:43:03 +0000 |
commit | 59b0f4e58faa3578969a643b1993ee7cbfc4b5f5 (patch) | |
tree | 980c476e04388150d4a4dc29c9b1881143d3258c | |
parent | f1520e89e3e9facafe708d390cf91cb43fc1bcb3 (diff) | |
download | aspectj-59b0f4e58faa3578969a643b1993ee7cbfc4b5f5.tar.gz aspectj-59b0f4e58faa3578969a643b1993ee7cbfc4b5f5.zip |
test and fix for 166084: istore incorrectly optimized
-rw-r--r-- | tests/bugs160/pr166084/Simple.java | 14 | ||||
-rw-r--r-- | tests/bugs160/pr166084/X.java | 3 | ||||
-rw-r--r-- | tests/bugs160/pr166084/simple.jar | bin | 0 -> 579 bytes | |||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java | 2 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc160/ajc160.xml | 5 |
5 files changed, 23 insertions, 1 deletions
diff --git a/tests/bugs160/pr166084/Simple.java b/tests/bugs160/pr166084/Simple.java new file mode 100644 index 000000000..c5992b4ee --- /dev/null +++ b/tests/bugs160/pr166084/Simple.java @@ -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 index 000000000..e60c2c397 --- /dev/null +++ b/tests/bugs160/pr166084/X.java @@ -0,0 +1,3 @@ +aspect X { + before(): call(* println(..)) {} +} diff --git a/tests/bugs160/pr166084/simple.jar b/tests/bugs160/pr166084/simple.jar Binary files differnew file mode 100644 index 000000000..3151ded97 --- /dev/null +++ b/tests/bugs160/pr166084/simple.jar diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java index 5b22d1717..d3c343b11 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -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() { diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml index 2e12408fa..a89a80949 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -10,6 +10,11 @@ </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 --> |