public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/5668: finit$ not called while using a constructor
@ 2002-04-15  2:46 bryce
  0 siblings, 0 replies; 6+ messages in thread
From: bryce @ 2002-04-15  2:46 UTC (permalink / raw)
  To: bryce, gcc-bugs, gcc-prs, java-prs, nobody, toddastock

Synopsis: finit$ not called while using a constructor

Responsible-Changed-From-To: unassigned->bryce
Responsible-Changed-By: bryce
Responsible-Changed-When: Mon Apr 15 02:46:15 2002
Responsible-Changed-Why:
    .
State-Changed-From-To: feedback->closed
State-Changed-By: bryce
State-Changed-When: Mon Apr 15 02:46:15 2002
State-Changed-Why:
    This was fixed by:
    
    2002-02-20  Per Bothner  <per@bothner.com>
    
    	* parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
    	to finit$ (otherwise generate_bytecode_insns drops it). However, we
    	don't need to set it on the COMPOUND_EXPR - the caller does that.

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


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

* Re: java/5668: finit$ not called while using a constructor
@ 2002-02-20 12:46 apbianco
  0 siblings, 0 replies; 6+ messages in thread
From: apbianco @ 2002-02-20 12:46 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, java-prs, nobody, toddastock

Synopsis: finit$ not called while using a constructor

State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Wed Feb 20 12:37:41 2002
State-Changed-Why:
    Per posted a patch to fix this problem:
    
      http://gcc.gnu.org/ml/gcc-patches/2002-02/msg01425.html

http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5668


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

* Re: java/5668: finit$ not called while using a constructor
@ 2002-02-12 11:16 Todd Stock
  0 siblings, 0 replies; 6+ messages in thread
From: Todd Stock @ 2002-02-12 11:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/5668; it has been noted by GNATS.

From: Todd Stock <toddastock@yahoo.com>
To: toddastock@yahoo.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/5668: finit$ not called while using a constructor
Date: Tue, 12 Feb 2002 11:12:13 -0800

 Unidiff for bug 5668:
 
 Index: gcc/java/parse.y
 ===================================================================
 RCS file: /cvsroot/gcc/gcc/gcc/java/parse.y,v
 retrieving revision 1.350
 diff -u -r1.350 parse.y
 --- gcc/java/parse.y	4 Feb 2002 02:38:16 -0000	1.350
 +++ gcc/java/parse.y	12 Feb 2002 19:09:48 -0000
 @@ -10690,9 +10690,11 @@
        func = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (method)), func);
      }
  
 -  if (TREE_CODE (patch) == CALL_EXPR)
 +  if (TREE_CODE (patch) == CALL_EXPR) {
 +    int save_can_complete_normal = CAN_COMPLETE_NORMALLY(patch);
      patch = build_call_or_builtin (method, func, args);
 -  else
 +    CAN_COMPLETE_NORMALLY(patch) = save_can_complete_normal;
 +  } else
      {
        TREE_TYPE (patch) = TREE_TYPE (TREE_TYPE (method));
        TREE_OPERAND (patch, 0) = func;
 @@ -12460,6 +12462,7 @@
      {
        tree super_wfl = build_wfl_node (super_identifier_node);
        tree a = NULL_TREE, t;
 +      CAN_COMPLETE_NORMALLY(super_wfl)=1;
        /* If we're dealing with an anonymous class, pass the arguments
           of the crafted constructor along. */
        if (ANONYMOUS_CLASS_P (DECL_CONTEXT (mdecl)))
 @@ -12468,7 +12471,9 @@
  	  for (; t != end_params_node; t = TREE_CHAIN (t))
  	    a = tree_cons (NULL_TREE, build_wfl_node (TREE_PURPOSE (t)), a);
  	}
 -      return build_method_invocation (super_wfl, a);
 +      a=build_method_invocation (super_wfl, a);
 +      CAN_COMPLETE_NORMALLY(a)=1;
 +      return a;
      }
  }
 
 gcc-gnats@gcc.gnu.org wrote:
 
 >Thank you very much for your problem report.
 >It has the internal identification `java/5668'.
 >The individual assigned to look at your
 >report is: unassigned. 
 >
 >>Category:       java
 >>Responsible:    unassigned
 >>Synopsis:       finit$ not called while using a constructor
 >>Arrival-Date:   Tue Feb 12 09:36:00 PST 2002
 >>
 >
 
 
 
 
 _________________________________________________________
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 


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

* Re: java/5668: finit$ not called while using a constructor
@ 2002-02-12 10:46 Todd Stock
  0 siblings, 0 replies; 6+ messages in thread
From: Todd Stock @ 2002-02-12 10:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/5668; it has been noted by GNATS.

From: Todd Stock <toddastock@yahoo.com>
To: toddastock@yahoo.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/5668: finit$ not called while using a constructor
Date: Tue, 12 Feb 2002 10:46:56 -0800

 In the bytecode.
 
 -Todd
 
 Alexandre Petit-Bianco wrote:
 
 >toddastock@yahoo.com writes:
 >
 >>If you have a constructor in your Java class the finit$ is not
 >>inserted after the super call.  If you omit the constructor all is
 >>fine.
 >>
 >
 >Are you seeing this when going native or bytecode?
 >
 >./A
 >
 
 
 
 
 _________________________________________________________
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 


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

* Re: java/5668: finit$ not called while using a constructor
@ 2002-02-12 10:26 Alexandre Petit-Bianco
  0 siblings, 0 replies; 6+ messages in thread
From: Alexandre Petit-Bianco @ 2002-02-12 10:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/5668; it has been noted by GNATS.

From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: toddastock@yahoo.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: java/5668: finit$ not called while using a constructor
Date: Tue, 12 Feb 2002 10:22:59 -0800 (PST)

 toddastock@yahoo.com writes:
 
 > If you have a constructor in your Java class the finit$ is not
 > inserted after the super call.  If you omit the constructor all is
 > fine.
 
 Are you seeing this when going native or bytecode?
 
 ./A


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

* java/5668: finit$ not called while using a constructor
@ 2002-02-12  9:36 toddastock
  0 siblings, 0 replies; 6+ messages in thread
From: toddastock @ 2002-02-12  9:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5668
>Category:       java
>Synopsis:       finit$ not called while using a constructor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 09:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.1 20020211 (experimental)
>Organization:
>Environment:
System: Linux escher 2.4.9-21 #1 Thu Jan 17 14:16:30 EST 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --enable-threads=posix --prefix=/home/tstock/local --disable-shared --enable-languages=c++,java
>Description:
If you have a constructor in your Java class the finit$ is not inserted after the super call.  If you omit the constructor all is fine.
>How-To-Repeat:
public class Test
  {
  Object o = new Object();

  Test ( )
    {
      if ( o == null )
        {
          System.err.println("Test failed\n");
        }
    }

  static public void main ( String argv[] )
    {
      new Test();
    }
  }
>Fix:
It's not clear that build_super_invocation is required to force the CAN_COMPLETE_NORMAL flag, however without it I am not sure what might happen in the patch_invoke function.
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.350
diff -r1.350 parse.y
10693c10693,10694
<   if (TREE_CODE (patch) == CALL_EXPR)
---
>   if (TREE_CODE (patch) == CALL_EXPR) {
>     int save_can_complete_normal = CAN_COMPLETE_NORMALLY(patch);
10695c10696,10697
<   else
---
>     CAN_COMPLETE_NORMALLY(patch) = save_can_complete_normal;
>   } else
12462a12465
>       CAN_COMPLETE_NORMALLY(super_wfl)=1;
12471c12474,12476
<       return build_method_invocation (super_wfl, a);
---
>       a=build_method_invocation (super_wfl, a);
>       CAN_COMPLETE_NORMALLY(a)=1;
>       return a;

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


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

end of thread, other threads:[~2002-04-15  9:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-15  2:46 java/5668: finit$ not called while using a constructor bryce
  -- strict thread matches above, loose matches on Subject: below --
2002-02-20 12:46 apbianco
2002-02-12 11:16 Todd Stock
2002-02-12 10:46 Todd Stock
2002-02-12 10:26 Alexandre Petit-Bianco
2002-02-12  9:36 toddastock

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