public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5941: incorrect "Unreachable statement" error
@ 2002-04-25 11:47 tromey
  0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2002-04-25 11:47 UTC (permalink / raw)
  To: ebb9, gcc-bugs, gcc-prs, java-prs, nobody, shroff, tromey

Synopsis: incorrect "Unreachable statement" error

Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Thu Apr 25 11:47:28 2002
Responsible-Changed-Why:
    I'm handling this.
State-Changed-From-To: open->analyzed
State-Changed-By: tromey
State-Changed-When: Thu Apr 25 11:47:28 2002
State-Changed-Why:
    First version of patch submitted.
    Next revision coming soon.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5941


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

* Re: java/5941: incorrect "Unreachable statement" error
@ 2002-05-06 21:14 tromey
  0 siblings, 0 replies; 3+ messages in thread
From: tromey @ 2002-05-06 21:14 UTC (permalink / raw)
  To: ebb9, gcc-bugs, gcc-prs, java-prs, shroff, tromey

Synopsis: incorrect "Unreachable statement" error

State-Changed-From-To: analyzed->closed
State-Changed-By: tromey
State-Changed-When: Mon May  6 21:14:44 2002
State-Changed-Why:
    I've checked in a fix for this.
    It will appear in gcj 3.2 (maybe 3.1.1, but don't count on it)

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5941


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

* java/5941: incorrect "Unreachable statement" error
@ 2002-03-13 11:36 shroff
  0 siblings, 0 replies; 3+ messages in thread
From: shroff @ 2002-03-13 11:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5941
>Category:       java
>Synopsis:       incorrect "Unreachable statement" error
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 13 11:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Saurin Shroff
>Release:        GNU Java version 3.0.1 (sparc-sun-solaris2.8)
>Organization:
>Environment:
Sun/Sparc Solaris
>Description:
I get:

hdlFSM.java:448: Unreachable statement.
            for (int i=lowIndex; i <= highIndex; i++) {
                                                       ^
1 error

The variable lowIndex and highIndex are set just before the
loop. Here is the partial code:

    int highIndex = dependency.hdlmGetHighIndex();
    int lowIndex = dependency.hdlmGetLowIndex();

    for (int i=lowIndex; i <= highIndex; i++) {
	if ( dependencyDeclaration.hdlmIsRegister(i) ||
	     dependencyDeclaration.hdlmIsLatch(i) ) {
	    /* encountered a register other then state variable */
	    return true;
	}

Object "dependency" is of type "hdlDependency" which is an
interface. The hdlmGetHighIndex and hdlmGetLowIndex are
methods described in the interface and are implemented in
classes that implement the interface.

There was one similar loop in the file before line 448, but
no error was issued against it.

Here is the command line I used and the result:

% gcj -v -C --encoding=UTF-8 -CLASSPATH /home/shroff/work hdlFSM.java

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/specs
Configured with: ../configure --with-as=/usr/local/bin/as --with-ld=/usr/local/bin/ld --enable-libgcj
Thread model: posix
gcc version 3.0.1
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/jc1 hdlFSM.java -quiet -dumpbase hdlFSM.java -g1 -version -fencoding=UTF-8 -fencoding=UTF-8 -fCLASSPATH=/home/shroff/work -fsyntax-only -femit-class-files -o /dev/null
GNU Java version 3.0.1 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.0.1.
hdlFSM.java: In class `dualsoft.rules.hdlFSM':
hdlFSM.java: In method `dualsoft.rules.hdlFSM.checkForPIAndNonStateVariables(java.util.Vector,dualsoft.rules.hdlDeclInterface,dualsoft.rules.hdlDeclInterface)':
hdlFSM.java:448: Unreachable statement.
            for (int i=lowIndex; i <= highIndex; i++) {
                                                       ^
1 error

Le me know if you want any other information.

-- Saurin
   shroff@transeda.com

P.S
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-05-07  4:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-25 11:47 java/5941: incorrect "Unreachable statement" error tromey
  -- strict thread matches above, loose matches on Subject: below --
2002-05-06 21:14 tromey
2002-03-13 11:36 shroff

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).