diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-30 16:39:17 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-30 16:39:17 +0000 |
| commit | b26dbd44d8ee5c1f08f994eb66def9d569b4a407 (patch) | |
| tree | 308ebf09b726508051fa31d6995cd292cf65992d | |
| parent | 1f8fb4716c48741ae1894d8597f41bd18751f8ef (diff) | |
| download | ppe42-gcc-b26dbd44d8ee5c1f08f994eb66def9d569b4a407.tar.gz ppe42-gcc-b26dbd44d8ee5c1f08f994eb66def9d569b4a407.zip | |
gcc/java
PR java/26042:
* parse.y (java_reorder_fields): Reset superclass field's size as
well.
libjava
PR java/26042:
* testsuite/libjava.compile/pr26042.java: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112540 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/java/parse.y | 4 | ||||
| -rw-r--r-- | libjava/ChangeLog | 5 | ||||
| -rw-r--r-- | libjava/testsuite/libjava.compile/pr26042.java | 12 |
4 files changed, 27 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 826d60808f0..64fea4add1a 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2006-03-30 Tom Tromey <tromey@redhat.com> + + PR java/26042: + * parse.y (java_reorder_fields): Reset superclass field's size as + well. + 2006-03-28 Tom Tromey <tromey@redhat.com> PR java/26390: diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 6b0bf767ca3..118c66f8221 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -7770,6 +7770,10 @@ java_reorder_fields (void) if (!DECL_NAME (TYPE_FIELDS (current_class))) { tree fields = TYPE_FIELDS (current_class); + /* This works around a problem where on some platforms, + the field might be given its size incorrectly. */ + DECL_SIZE (fields) = NULL_TREE; + DECL_SIZE_UNIT (fields) = NULL_TREE; TREE_CHAIN (fields) = nreverse (TREE_CHAIN (fields)); TYPE_SIZE (current_class) = NULL_TREE; } diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 50b30aff3e3..9867c7a1916 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2006-03-30 Tom Tromey <tromey@redhat.com> + + PR java/26042: + * testsuite/libjava.compile/pr26042.java: New file. + 2006-03-29 Tom Tromey <tromey@redhat.com> * sources.am, Makefile.in: Rebuilt. diff --git a/libjava/testsuite/libjava.compile/pr26042.java b/libjava/testsuite/libjava.compile/pr26042.java new file mode 100644 index 00000000000..485b36a5a54 --- /dev/null +++ b/libjava/testsuite/libjava.compile/pr26042.java @@ -0,0 +1,12 @@ +class One +{ + long l; // no ICE if this is int, not long + int b; // no ICE if this line is gone; type doesn't matter +} + +public class pr26042 +{ + class Three extends One { } + Three three () { return new Three (); } +} + |

