This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/13183] New: incorrect multidimensional array initializer with -O2


The test case:

class procinfo { }
 
class autogen {
  static String procs[][] = {{"Catchtable", "CatchEntry"}};
  public static void main(String argv[]) { }
}

fails to execute if compiled with -O2:

$ ./autogen
Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass() (/opt/gcc/lib/libgcj.so.4.0.0)
   at _Jv_InitClass (/opt/gcc/lib/libgcj.so.4.0.0)
   at autogen.main(java.lang.String[]) (Unknown Source)
Caused by: java.lang.NullPointerException
   at _Jv_NewObjectArray (/opt/gcc/lib/libgcj.so.4.0.0)
   at autogen.__U3c_clinit__U3e_() (Unknown Source)
   at java.lang.Class.initializeClass() (/opt/gcc/lib/libgcj.so.4.0.0)
   ...2 more

-- 
           Summary: incorrect multidimensional array initializer with -O2
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsturm at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13183


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