From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5052 invoked by alias); 12 Feb 2002 17:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4969 invoked by uid 71); 12 Feb 2002 17:36:00 -0000 Resent-Date: 12 Feb 2002 17:36:00 -0000 Resent-Message-ID: <20020212173600.4968.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, java-prs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, toddastock@yahoo.com Received:(qmail 532 invoked from network); 12 Feb 2002 17:34:07 -0000 Received: from unknown (HELO localhost.localdomain) (12.230.248.186) by sources.redhat.com with SMTP; 12 Feb 2002 17:34:07 -0000 Received: (from tstock@localhost) by localhost.localdomain (8.11.6/8.11.6) id g1CHZB116367; Tue, 12 Feb 2002 09:35:11 -0800 Message-Id:<200202121735.g1CHZB116367@localhost.localdomain> Date: Tue, 12 Feb 2002 09:36:00 -0000 From: toddastock@yahoo.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: java/5668: finit$ not called while using a constructor X-SW-Source: 2002-02/txt/msg00281.txt.bz2 List-Id: >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: