From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23254 invoked by alias); 11 Mar 2002 02:26:02 -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 23204 invoked by uid 71); 11 Mar 2002 02:26:01 -0000 Resent-Date: 11 Mar 2002 02:26:01 -0000 Resent-Message-ID: <20020311022601.23203.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, ebb9@email.byu.edu Received:(qmail 22332 invoked from network); 11 Mar 2002 02:24:37 -0000 Received: from unknown (HELO quaffle.ee.byu.edu) (128.187.114.165) by sources.redhat.com with SMTP; 11 Mar 2002 02:24:37 -0000 Received: (from eblake@localhost) by quaffle.ee.byu.edu (8.11.6/8.11.6) id g2B2OaE04441; Sun, 10 Mar 2002 19:24:36 -0700 Message-Id:<200203110224.g2B2OaE04441@quaffle.ee.byu.edu> Date: Sun, 10 Mar 2002 18:26:00 -0000 From: Eric.Blake@quaffle.ee.byu.edu Reply-To: ebb9@email.byu.edu To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: java/5913: Core dump for String constant instanceof X-SW-Source: 2002-03/txt/msg00335.txt.bz2 List-Id: >Number: 5913 >Category: java >Synopsis: Core dump for String constant instanceof >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Mar 10 18:26:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Eric Blake >Release: 3.1 20020309 (prerelease) >Organization: >Environment: System: Linux quaffle 2.4.9-13smp #1 SMP Tue Oct 30 19:57:16 EST 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../gcc/configure --enable-threads=posix --prefix=/fpga3/users/eblake/gcc --enable-shared >Description: I encountered this while patching bug 5902. This program is legal, and should print "true". Remember, + has higher precedence than instanceof, and ""+1 is a constant with the value "1". A string literal is always an instanceof String. class Foo { public static void main(String[] args) { System.out.println((""+1) instanceof String); } } >How-To-Repeat: bash-2.05$ gcj --main=Foo -o Foo Foo.java Foo.java: In class `Foo': Foo.java: In method `Foo.main(java.lang.String[])': Foo.java:4: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. >Fix: >Release-Note: >Audit-Trail: >Unformatted: