From 59b0f4e58faa3578969a643b1993ee7cbfc4b5f5 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 29 Nov 2006 13:43:03 +0000 Subject: test and fix for 166084: istore incorrectly optimized --- tests/bugs160/pr166084/Simple.java | 14 ++++++++++++++ tests/bugs160/pr166084/X.java | 3 +++ tests/bugs160/pr166084/simple.jar | Bin 0 -> 579 bytes tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java | 2 +- tests/src/org/aspectj/systemtest/ajc160/ajc160.xml | 5 +++++ 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tests/bugs160/pr166084/Simple.java create mode 100644 tests/bugs160/pr166084/X.java create mode 100644 tests/bugs160/pr166084/simple.jar 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 new file mode 100644 index 000000000..3151ded97 Binary files /dev/null and b/tests/bugs160/pr166084/simple.jar differ 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 @@ + + + + + -- cgit v1.2.3