public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/17700] New: -Os causes bad build of libgcj.so.5.0.0 file
@ 2004-09-27 19:14 dick at softplc dot com
  2004-09-27 20:41 ` [Bug libgcj/17700] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dick at softplc dot com @ 2004-09-27 19:14 UTC (permalink / raw)
  To: java-prs

On x86 linux 2.6.x using gcc 3.4.2 or 3.4.1 the -Os option causes a bad
libgcj.so.5.0.0 image to be built.

The symptom of the problem is a NullPointerException in Calendar property file
lookup, exhibited by the following program:

----------------------

import java.text.SimpleDateFormat;

public class Test
{
 public static void main( String[] args )
 {
   System.out.println("before");  System.out.flush();

   SimpleDateFormat dateFormatter =
               new SimpleDateFormat( "yy-MMM-dd HH:mm" );

   System.out.println("after");  System.out.flush();
 }
}

--------------

Running the above program with the bad libgcj.so.5.0.0 gives the

"before"

output, then the NullPointerException somewhere in the Calendar property file
lookup.

If you build the libgcj with "-g3 -O2" instead of "-g3 -Os", then all is well.

--------------

$ gcj Test.java -o test.prog --main=Test

Here is my configure script:

--------------

#!/bin/sh

# See this URL for instructions on what this all means:
# http://gcc.gnu.org/install/

GCJFLAGS="-g3 -O2"        # works ok
#GCJFLAGS="-g3 -Os"       # causes NullPointerException in Test.java


#SRCDIR=/rt/gcc-3.4.1
SRCDIR=/rt/gcc-3.4.2
#SRCDIR=/rt/gcc-4.0-20040919

if [ -z $BUILDDIR ]; then
   BUILDDIR=gccbuild
fi

if [ ! -e $BUILDDIR ]; then
   mkdir $BUILDDIR
fi

PWD=`pwd`
cd $BUILDDIR

if [ "$1" = "distclean" ]; then
   shift
   make distclean
   find . -name config.cache -exec rm -f {} \;
fi

if [ "$1" = "configure" ]; then
   shift
   $SRCDIR/configure -v --enable-languages=c,c++,java \
   --prefix=/rt/gcc --enable-threads=posix \
   --with-system-zlib --enable-nls --without-included-gettext \
   --enable-libgcj-debug \
   --enable-__cxa_atexit --enable-clocale=gnu \
   --without-x --disable-java-awt --disable-gtk-cairo --with-gnu-ld \
   i486-linux
fi

if [ "$1" = "build" ]; then
   shift
   make  GCJFLAGS="$GCJFLAGS" \
      LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
fi

if [ "$1" = "install" ]; then
   shift
   make install
fi

cd $PWD

-- 
           Summary: -Os causes bad build of libgcj.so.5.0.0 file
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dick at softplc dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
GCC target triplet: i486-linux


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-08-15  0:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 19:14 [Bug libgcj/17700] New: -Os causes bad build of libgcj.so.5.0.0 file dick at softplc dot com
2004-09-27 20:41 ` [Bug libgcj/17700] " pinskia at gcc dot gnu dot org
2004-09-28  0:21 ` pinskia at gcc dot gnu dot org
2004-09-28 14:30 ` dick at softplc dot com
2004-09-29 12:56 ` [Bug rtl-optimization/17700] " pinskia at gcc dot gnu dot org
2005-08-15  0:39 ` mueller at kde dot org

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