From f8691bddfa6cfee3b1e7d423b6c1ba3f701028ef Mon Sep 17 00:00:00 2001 From: tromey Date: Fri, 16 Dec 2005 00:00:43 +0000 Subject: gcc/java: PR java/25429 * parse.y (resolve_expression_name): Don't generate accessor methods for constant fields. libjava: * testsuite/libjava.compile/rh175833.java: New file. * testsuite/libjava.compile/pr25429.java: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108608 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 5 +++++ libjava/testsuite/libjava.compile/pr25429.java | 13 +++++++++++++ libjava/testsuite/libjava.compile/rh175833.java | 13 +++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 libjava/testsuite/libjava.compile/pr25429.java create mode 100644 libjava/testsuite/libjava.compile/rh175833.java (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0c00f2e46d9..b3a03b720d3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-12-15 Tom Tromey + + * testsuite/libjava.compile/rh175833.java: New file. + * testsuite/libjava.compile/pr25429.java: New file. + 2005-12-15 Alan Modra * testsuite/lib/libjava.exp: Revert 2005-12-01. diff --git a/libjava/testsuite/libjava.compile/pr25429.java b/libjava/testsuite/libjava.compile/pr25429.java new file mode 100644 index 00000000000..a869b585c4b --- /dev/null +++ b/libjava/testsuite/libjava.compile/pr25429.java @@ -0,0 +1,13 @@ +public class pr25429 +{ + private static final int CONST = 0; + class I { + public void f () { + switch(0) { + case CONST: + } + } + } + + public static void main(String[] args) { } +} diff --git a/libjava/testsuite/libjava.compile/rh175833.java b/libjava/testsuite/libjava.compile/rh175833.java new file mode 100644 index 00000000000..6bdec57cb6e --- /dev/null +++ b/libjava/testsuite/libjava.compile/rh175833.java @@ -0,0 +1,13 @@ +// Follow-on to PR 25429 +public class rh175833 +{ + private static final Object CONST = new Object(); + class I { + public Object f () { + // We need an accessor here. + return CONST; + } + } + + public static void main(String[] args) { } +} -- cgit v1.2.3