This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/1473: can't byte-compile a file



>Number:         1473
>Category:       java
>Synopsis:       can't byte-compile a file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:20:30 PST 2000
>Closed-Date:    Fri Nov 05 11:07:15 PST 1999
>Last-Modified:  Fri Nov  5 11:16:01 PST 1999
>Originator:     Tom Tromey
>Release:        current cvs (of java anyway; rest of egcs is out of date)
>Organization:
>Environment:

>Description:
I can't byte-compile this file:

creche. cat Bug.java 
public class Bug {
    // This demonstrates a bug in gcj
    public static void main(String[] argv){
        int i = 666;
        System.out.println("The number "+i+" is "+ (""+i).length() +" digits wide");
    }
}


creche. gcj -C Bug.java Bug.java: In class `Bug':
Bug.java: In method `main(java.lang.String[])':
Bug.java:5: internal error - tree code not implemented: error_mark
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/91

State-Changed-From-To: open->analyzed
State-Changed-By: apbianco
State-Changed-When: Fri Nov  5 10:40:04 1999
State-Changed-Why:
    The patch that I submitted for the PR #55 fixes this 
    problem, I just verified it:
    
     Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
     
            * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
            (qualify_ambiguous_name): Likewise.
            
     Index: parse.y
     ===================================================================
     RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
     retrieving revision 1.117
     diff -u -p -r1.117 parse.y
     --- parse.y    1999/11/02 07:51:19     1.117
     +++ parse.y    1999/11/04 22:34:53
     @@ -6714,6 +6714,15 @@ resolve_qualified_expression_name (wfl, 
              type = QUAL_DECL_TYPE (decl);
              continue;
      
     +      case PLUS_EXPR:
     +        if ((decl = java_complete_tree (qual_wfl)) == error_mark_node)
     +          return 1;
     +        if ((type = patch_string (decl)))
     +          decl = type;
     +        *where_found = QUAL_RESOLUTION (q) = decl;
     +        *type_found = type = TREE_TYPE (decl);
     +        break;
     +
            default:
              /* Fix for -Wall Just go to the next statement. Don't
                   continue */
     @@ -7885,7 +7894,8 @@ qualify_ambiguous_name (id)
                 TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
            name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
      
     -    else if (code == STRING_CST || code == CONDITIONAL_EXPR)
     +    else if (code == STRING_CST || code == CONDITIONAL_EXPR 
     +           || code == PLUS_EXPR)
            {
            qual = TREE_CHAIN (qual);
            qual_wfl = QUAL_WFL (qual);
    
    

From: apbianco@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/91
Date: 5 Nov 1999 18:40:04 -0000

 Synopsis: can't byte-compile a file
 
 State-Changed-From-To: open->analyzed
 State-Changed-By: apbianco
 State-Changed-When: Fri Nov  5 10:40:04 1999
 State-Changed-Why:
     The patch that I submitted for the PR #55 fixes this 
     problem, I just verified it:
     
      Thu Nov  4 16:27:01 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
      
             * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
             (qualify_ambiguous_name): Likewise.
             
      Index: parse.y
      ===================================================================
      RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v
      retrieving revision 1.117
      diff -u -p -r1.117 parse.y
      --- parse.y    1999/11/02 07:51:19     1.117
      +++ parse.y    1999/11/04 22:34:53
      @@ -6714,6 +6714,15 @@ resolve_qualified_expression_name (wfl, 
               type = QUAL_DECL_TYPE (decl);
               continue;
       
      +      case PLUS_EXPR:
      +        if ((decl = java_complete_tree (qual_wfl)) == error_mark_node)
      +          return 1;
      +        if ((type = patch_string (decl)))
      +          decl = type;
      +        *where_found = QUAL_RESOLUTION (q) = decl;
      +        *type_found = type = TREE_TYPE (decl);
      +        break;
      +
             default:
               /* Fix for -Wall Just go to the next statement. Don't
                    continue */
      @@ -7885,7 +7894,8 @@ qualify_ambiguous_name (id)
                  TREE_CODE (TREE_OPERAND (qual_wfl, 0)) == EXPR_WITH_FILE_LOCATION)
             name = EXPR_WFL_NODE (TREE_OPERAND (qual_wfl, 0));
       
      -    else if (code == STRING_CST || code == CONDITIONAL_EXPR)
      +    else if (code == STRING_CST || code == CONDITIONAL_EXPR 
      +           || code == PLUS_EXPR)
             {
             qual = TREE_CHAIN (qual);
             qual_wfl = QUAL_WFL (qual);
     
     
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&database=java&pr=91
State-Changed-From-To: analyzed->closed
State-Changed-By: tromey
State-Changed-When: Fri Nov  5 11:07:15 1999
State-Changed-Why:
    Sorry about that.  I was using this test program for
    something else, and I didn't remember that it came
    from a PR.  I'm closing this since it is just a duplicate
    of PR 55.  (Incidentally I tried the fix for PR 55 and
    it worked for me on this test.  I didn't try it on
    anything else, though.)

From: tromey@cygnus.com
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, tromey@cygnus.com
Cc:  
Subject: Re: gcj/91
Date: 5 Nov 1999 19:07:15 -0000

 Synopsis: can't byte-compile a file
 
 State-Changed-From-To: analyzed->closed
 State-Changed-By: tromey
 State-Changed-When: Fri Nov  5 11:07:15 1999
 State-Changed-Why:
     Sorry about that.  I was using this test program for
     something else, and I didn't remember that it came
     from a PR.  I'm closing this since it is just a duplicate
     of PR 55.  (Incidentally I tried the fix for PR 55 and
     it worked for me on this test.  I didn't try it on
     anything else, though.)
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&database=java&pr=91
>Unformatted:



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]