public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/23891] New: Problem folding static fields across packages
@ 2005-09-15  0:04 mckinlay at redhat dot com
  2005-09-15  0:09 ` [Bug java/23891] " mckinlay at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: mckinlay at redhat dot com @ 2005-09-15  0:04 UTC (permalink / raw)
  To: java-prs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

The following test case, derived from Eclipse/ecj, fails to compile on HEAD and
current 4.0 branch. This is a regression since 4.0.0.

package ast;

import classfmt.*;
public abstract class ASTNode implements ClassFileConstants {
}

---

package ast;

public class EqualExpression extends ASTNode {
        public void resolveType() {
                long foo = JDK1_5;
        }
}

---

package classfmt;

public interface ClassFileConstants {
        int MINOR_VERSION_0 = 0;
        long JDK1_5 = (long) ClassFileConstants.MINOR_VERSION_0;
}


$ gcj -c ast/EqualExpression.java
./classfmt/ClassFileConstants.java: In class 'ast.EqualExpression':
./classfmt/ClassFileConstants.java: In method 'ast.EqualExpression.resolveType()':
./classfmt/ClassFileConstants.java:5: error: Undefined variable or class name:
‘ClassFileConstants.MINOR_VERSION_0’.
        long JDK1_5 = (long) ClassFileConstants.MINOR_VERSION_0;
                                ^
1 error

-- 
           Summary: Problem folding static fields across packages
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckinlay at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23891


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-10-01  6:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-15  0:04 [Bug java/23891] New: Problem folding static fields across packages mckinlay at redhat dot com
2005-09-15  0:09 ` [Bug java/23891] " mckinlay at redhat dot com
2005-09-15 14:13 ` cvs-commit at gcc dot gnu dot org
2005-09-15 14:20 ` mckinlay at redhat dot com
2005-09-15 14:20 ` mckinlay at redhat dot com
2005-09-16 20:05 ` [Bug java/23891] [4.0 Regression] " debian-gcc at lists dot debian dot org
2005-09-21 13:45 ` cvs-commit at gcc dot gnu dot org
2005-09-22 17:44 ` mckinlay at redhat dot com
2005-10-01  6:20 ` cvs-commit at gcc dot gnu dot org
2005-10-01  6:58 ` mckinlay at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).