This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj/340: Static array initializer link failure with -O



>Number:         340
>Category:       gcj
>Synopsis:       Static array initializer link failure with -O
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 06 01:30:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Bryce McKinlay
>Release:        gcc version 2.96 20000905 (experimental)
>Organization:
>Environment:

>Description:
Static arrays with initializers fail to link when optimization
is used. This is a recent regression.

$ gcj ArrayInit.java -o ai --main=ArrayInit -O
/tmp/ccmJthip.o: In function `ArrayInit::_003cclinit_003e(unsigned)':
/tmp/ccmJthip.o(.text+0x99): undefined reference to `LJv0'
collect2: ld returned 1 exit status
>How-To-Repeat:
Compile this test case:

public class ArrayInit
{
  static int a[] = {1,2,3};
  
  public static void main(String args[])
  {
    System.out.println (a[0]);
  }
}
>Fix:

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]