From mboxrd@z Thu Jan 1 00:00:00 1970 From: joerg.brunsmann@fernuni-hagen.de To: java-gnats@sourceware.cygnus.com Subject: java/1135: gcj dumps core on method invocation on a primitive type Date: Wed, 20 Dec 2000 12:09:00 -0000 Message-id: <20000106110436.30347.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg00936.html List-Id: >Number: 1135 >Category: java >Synopsis: gcj dumps core on method invocation on a primitive type >Confidential: no >Severity: serious >Priority: medium >Responsible: apbianco >State: closed >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:06:28 PST 2000 >Closed-Date: Thu Jun 01 13:43:25 PDT 2000 >Last-Modified: Thu Jun 1 13:50:00 PDT 2000 >Originator: joerg.brunsmann@fernuni-hagen.de >Release: unknown-1.0 >Organization: >Environment: >Description: gcj dumps core on method invocation on a primitive type >How-To-Repeat: class Z { void f() { int i; i.f(); } } $ gcj Z.java gcj: Internal compiler error: program jc1 got fatal signal 11 >Fix: >Release-Note: >Audit-Trail: Formerly PR gcj/127 From: Bryce McKinlay To: joerg.brunsmann@fernuni-hagen.de Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/127: gcj dumps core on method invocation on a primitive type Date: Wed, 24 May 2000 00:23:06 +1200 This is a multi-part message in MIME format. --------------08B5E1309CA34344A4E98C68 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I wrote a patch for this. regards [ bryce ] --------------08B5E1309CA34344A4E98C68 Content-Type: text/plain; charset=us-ascii; name="gcj-prim_invoke.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gcj-prim_invoke.patch" 2000-05-23 Bryce McKinlay * parse.y (patch_method_invocation): Don't try to lookup methods in primitive types. Index: parse.y =================================================================== RCS file: /cvs/gcc/egcs/gcc/java/parse.y,v retrieving revision 1.168 diff -u -r1.168 parse.y --- parse.y 2000/05/20 22:38:05 1.168 +++ parse.y 2000/05/23 12:15:44 @@ -9322,6 +9322,16 @@ type = GET_SKIP_TYPE (resolved); resolve_and_layout (type, NULL_TREE); + + if (JPRIMITIVE_TYPE_P (type)) + { + parse_error_context + (identifier_wfl, + "Can't invoke a method on primitive type `%s'", + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)))); + PATCH_METHOD_RETURN_ERROR (); + } + list = lookup_method_invoke (0, identifier_wfl, type, identifier, args); args = nreverse (args); --------------08B5E1309CA34344A4E98C68-- State-Changed-From-To: open->closed State-Changed-By: apbianco State-Changed-When: Thu Jun 1 13:43:25 2000 State-Changed-Why: I verified and checked in Bryce's fix: http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00029.html From: apbianco@cygnus.com To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, joerg.brunsmann@fernuni-hagen.de Cc: Subject: Re: gcj/127 Date: 1 Jun 2000 20:43:25 -0000 Synopsis: gcj dumps core on method invocation on a primitive type State-Changed-From-To: open->closed State-Changed-By: apbianco State-Changed-When: Thu Jun 1 13:43:25 2000 State-Changed-Why: I verified and checked in Bryce's fix: http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00029.html http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=127&database=java >Unformatted: