public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/2299: Problem with String Arrays and +=
@ 2001-03-16  2:18 Martin Kahlert
  0 siblings, 0 replies; only message in thread
From: Martin Kahlert @ 2001-03-16  2:18 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2299
>Category:       java
>Synopsis:       Use of += for String arrays produces Segfault during compilation
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 16 02:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Martin Kahlert
>Release:        3.0 20010312 (prerelease)
>Organization:
Infineon AG
>Environment:
System: Linux keksy 2.2.18 #5 SMP Wed Jan 24 09:24:42 CET 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../configure --prefix=/sw/gcc-3 --enable-languages=c++,f77,java --enable-threads=posix
>Description:
	The += operator for string arrays does not work. 
        It works for strings.
        s[0] = s[0] + string works, too, though this should be equivalent to s[0] += string

        This error report is meant to replace the report
        java/2008: ICE in gcj (no optimization), 
        because it is a much simpler testcase.
        Sorry, i don't know how to do that myself.
>How-To-Repeat:
cat buggy.java
public class buggy
{
 public static void main(String[] args)
    {
     String s[] = new String[1];

     s[0] =  "";
     s[0] += "";
    }
}
gcj -c buggy.java
buggy.java: In class `buggy':
buggy.java: In method `buggy.main(java.lang.String[])':
buggy.java:8: Internal error: Segmentation fault
Please submit a full bug report, with preprocessed source if appropriate.
See <URL: http://www.gnu.org/software/gcc/bugs.html > for instructions.

>Fix:
	Workaround: Use s[0] = s[0] + "" instead of s[0] += ""
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-03-16  2:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-16  2:18 java/2299: Problem with String Arrays and += Martin Kahlert

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