public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/46059] New: internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions
@ 2010-10-17 18:19 baryluk at smp dot if.uj.edu.pl
  2010-10-17 19:42 ` [Bug bootstrap/46059] " baryluk at smp dot if.uj.edu.pl
  2010-10-21 23:06 ` [Bug java/46059] " baryluk at smp dot if.uj.edu.pl
  0 siblings, 2 replies; 3+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-17 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: internel compiler error when compiling
                    libjava/gnu/awt/LightweightRedirector.java with
                    -finline-functions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: baryluk@smp.if.uj.edu.pl


Hi.

I have long standing problem of bootstraping gcc 4.6 with -finline-functions
(or -O3 actually).



# export FLAGS="-O2 -finline-functions"
# export CFLAGS=$FLAGS
# export CXXFLAGS=$FLAGS

# cd /
# rm -rf /scratch/obiekty
# mkdir /scratch/obiekty || exit 1
# cd /scratch/obiekty
# /scratch/gcc-4.6-20101016/configure \
    --enable-languages=c,c++,java \
    --enable-checking=yes \
    CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS"

# make "BOOT_CFLAGS=$CFLAGS" bootstrap


...
libtool: compile:  /scratch/obiekty/./gcc/gcj
-B/scratch/obiekty/i686-pc-linux-gnu/libjava/ -B/scratch/obiekty/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -ffloat-store -fomit-frame-pointer
-Usun -fclasspath=
-fbootclasspath=/scratch/gcc-4.6-20101009/libjava/classpath/lib
--encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-MT gnu/awt.lo -MD -MP -MF gnu/awt.deps @gnu/awt.list  -fPIC -o gnu/.libs/awt.o
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In class
'gnu.awt.LightweightRedirector':
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In method
'gnu.awt.LightweightRedirector.getButtonNumber(java.awt.event.InputEvent)':
In file included from <built-in>:2:0:
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
error: verification failed at PC=12: branch out of range
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [gnu/awt.lo] Błąd 1
make[3]: Opuszczenie katalogu `/scratch/obiekty/i686-pc-linux-gnu/libjava'
make[2]: *** [all-recursive] Błąd 1
make[2]: Opuszczenie katalogu `/scratch/obiekty/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Błąd 2
make[1]: Opuszczenie katalogu `/scratch/obiekty'
make: *** [bootstrap] Błąd 2
#



This problem is present in gcc 4.6 snapshots from more than a month. Compiling
without -finline-functions resolves problem.




Compiling manually with '-v -save-temps':


root@tytus:/scratch/obiekty/i686-pc-linux-gnu/libjava#
/scratch/obiekty/./gcc/gcj -v -save-temps 
-B/scratch/obiekty/i686-pc-linux-gnu/libjava/ -B/scratch/obiekty/./gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/
-isystem /usr/local/i686-pc-linux-gnu/include -isystem
/usr/local/i686-pc-linux-gnu/sys-include -ffloat-store -fomit-frame-pointer
-Usun -fclasspath=
-fbootclasspath=/scratch/gcc-4.6-20101009/libjava/classpath/lib
--encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-MT gnu/awt.lo -MD -MP -MF gnu/awt.deps @gnu/awt.list  -fPIC -o gnu/.libs/awt.o
Reading specs from /scratch/obiekty/./gcc/specs
Reading specs from /scratch/obiekty/i686-pc-linux-gnu/libjava/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
COLLECT_GCC=/scratch/obiekty/./gcc/gcj
COLLECT_LTO_WRAPPER=/scratch/obiekty/./gcc/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /scratch/gcc-4.6-20101009/configure
--enable-languages=c,c++,java --enable-checking=yes CFLAGS='-O2
-finline-functions' CXXFLAGS='-O2 -finline-functions'
Thread model: posix
gcc version 4.6.0 20101016 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-B'
'/scratch/obiekty/i686-pc-linux-gnu/libjava/' '-B' '/scratch/obiekty/./gcc/'
'-B' '/usr/local/i686-pc-linux-gnu/bin/' '-B'
'/usr/local/i686-pc-linux-gnu/lib/' '-isystem'
'/usr/local/i686-pc-linux-gnu/include' '-isystem'
'/usr/local/i686-pc-linux-gnu/sys-include' '-ffloat-store'
'-fomit-frame-pointer' '-U' 'sun' '-fencoding=UTF-8' '-Wno-deprecated'
'-fbootstrap-classes' '-g' '-O2' '-c'
'-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes'
'-MT' 'gnu/awt.lo' '-MD' '-MP' '-MF' 'gnu/awt.deps' '-fPIC' '-o'
'gnu/.libs/awt.o'
'-fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/'
'-shared-libgcc' '-mtune=generic' '-march=pentiumpro'
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-B'
'/scratch/obiekty/i686-pc-linux-gnu/libjava/' '-B' '/scratch/obiekty/./gcc/'
'-B' '/usr/local/i686-pc-linux-gnu/bin/' '-B'
'/usr/local/i686-pc-linux-gnu/lib/' '-isystem'
'/usr/local/i686-pc-linux-gnu/include' '-isystem'
'/usr/local/i686-pc-linux-gnu/sys-include' '-ffloat-store'
'-fomit-frame-pointer' '-U' 'sun' '-fencoding=UTF-8' '-Wno-deprecated'
'-fbootstrap-classes' '-g' '-O2' '-c'
'-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes'
'-MT' 'gnu/awt.lo' '-MD' '-MP' '-MF' 'gnu/awt.deps' '-fPIC' '-o'
'gnu/.libs/awt.o'
'-fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/'
'-shared-libgcc' '-mtune=generic' '-march=pentiumpro'
 /scratch/obiekty/./gcc/jc1
/scratch/gcc-4.6-20101009/libjava/classpath/lib/gnu/awt/LightweightRedirector.class
-fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase
LightweightRedirector.class -mtune=generic -march=pentiumpro -auxbase-strip
gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -ffloat-store
-fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-fPIC -fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/
-faux-classpath LightweightRedirector.zip -MD_ -MT gnu/awt.lo -MF gnu/awt.deps
-o LightweightRedirector.s
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Class path starts here:
    LightweightRedirector.zip/ (zip)
    ./ (system)
    /scratch/gcc-4.6-20101009/libjava/classpath/lib/ (system)
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In class
'gnu.awt.LightweightRedirector':
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In method
'gnu.awt.LightweightRedirector.getButtonNumber(java.awt.event.InputEvent)':
In file included from <built-in>:2:0:
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
error: verification failed at PC=12: branch out of range
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
internal compiler error: Naruszenie ochrony pamięci
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.



So, debuging in gdb last command:


root@tytus:/scratch/obiekty/i686-pc-linux-gnu/libjava# gdb --args
/scratch/obiekty/./gcc/jc1
/scratch/gcc-4.6-20101009/libjava/classpath/lib/gnu/awt/LightweightRedirector.class
-fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase
LightweightRedirector.class -mtune=generic -march=pentiumpro -auxbase-strip
gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -ffloat-store
-fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-fPIC -fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/
-faux-classpath LightweightRedirector.zip -MD_ -MT gnu/awt.lo -MF gnu/awt.deps
-o LightweightRedirector.s
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /scratch/obiekty/gcc/jc1...done.
(gdb) run
Starting program: /scratch/obiekty/gcc/jc1
/scratch/gcc-4.6-20101009/libjava/classpath/lib/gnu/awt/LightweightRedirector.class
-fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase
LightweightRedirector.class -mtune=generic -march=pentiumpro -auxbase-strip
gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -ffloat-store
-fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-fPIC -fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/
-faux-classpath LightweightRedirector.zip -MD_ -MT gnu/awt.lo -MF gnu/awt.deps
-o LightweightRedirector.s
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Class path starts here:
    LightweightRedirector.zip/ (zip)
    ./ (system)
    /scratch/gcc-4.6-20101009/libjava/classpath/lib/ (system)
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In class
'gnu.awt.LightweightRedirector':
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In method
'gnu.awt.LightweightRedirector.getButtonNumber(java.awt.event.InputEvent)':
In file included from <built-in>:2:0:
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
error: verification failed at PC=12: branch out of range

Program received signal SIGSEGV, Segmentation fault.
0x080eba22 in merge_into ()
(gdb) bt
#0  0x080eba22 in merge_into ()
#1  0x080ee586 in verify_instructions_0 ()
#2  0x080f38f5 in verify_method ()
#3  0x080eaf4a in verify_jvm_instructions_new ()
#4  0x080e04f9 in expand_byte_code ()
#5  0x080faa5c in parse_class_file ()
#6  0x080fb325 in java_parse_file ()
#7  0x0841a076 in toplev_main ()
#8  0x08106deb in main ()
(gdb) 


Will see if compiling with additional -g, will show me something more.


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

* [Bug bootstrap/46059] internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions
  2010-10-17 18:19 [Bug bootstrap/46059] New: internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions baryluk at smp dot if.uj.edu.pl
@ 2010-10-17 19:42 ` baryluk at smp dot if.uj.edu.pl
  2010-10-21 23:06 ` [Bug java/46059] " baryluk at smp dot if.uj.edu.pl
  1 sibling, 0 replies; 3+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-17 19:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Witold Baryluk <baryluk at smp dot if.uj.edu.pl> 2010-10-17 19:42:33 UTC ---
Same version compiled with '-g -O2 -finline-functions', to have debuging
symbols.

(gdb) run
Starting program: /scratch/obiekty/gcc/jc1
/scratch/gcc-4.6-20101009/libjava/classpath/lib/gnu/awt/LightweightRedirector.class
-fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
-fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase
LightweightRedirector.class -mtune=generic -march=pentiumpro -auxbase-strip
gnu/.libs/awt.o -g -O2 -Wno-deprecated -version -ffloat-store
-fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes
-fsource-filename=/scratch/obiekty/i686-pc-linux-gnu/libjava/classpath/lib/classes
-fPIC -fbootclasspath=./:/scratch/gcc-4.6-20101009/libjava/classpath/lib/
-faux-classpath LightweightRedirector.zip -MD_ -MT gnu/awt.lo -MF gnu/awt.deps
-o LightweightRedirector.s
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Java (GCC) version 4.6.0 20101016 (experimental) (i686-pc-linux-gnu)
    compiled by GNU C version 4.6.0 20101016 (experimental), GMP version 4.3.2,
MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Class path starts here:
    LightweightRedirector.zip/ (zip)
    ./ (system)
    /scratch/gcc-4.6-20101009/libjava/classpath/lib/ (system)
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In class
'gnu.awt.LightweightRedirector':
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java: In method
'gnu.awt.LightweightRedirector.getButtonNumber(java.awt.event.InputEvent)':
In file included from <built-in>:2:0:
/scratch/gcc-4.6-20101009/libjava/gnu/awt/LightweightRedirector.java:160:0:
error: verification failed at PC=12: branch out of range

Program received signal SIGSEGV, Segmentation fault.
0x080eba22 in merge_into (npc=111936440, from_state=0x8d2e9b8) at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:1415
1415      for (iter = vfr->states[npc]; iter != NULL; iter = iter->next)
(gdb) bt
#0  0x080eba22 in merge_into (npc=111936440, from_state=0x8d2e9b8) at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:1415
#1  0x080ee586 in push_jump () at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:1460
#2  verify_instructions_0 () at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:2867
#3  0x080f38f5 in verify_instructions (meth=0xbffff218) at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:3197
#4  verify_method (meth=0xbffff218) at
/scratch/gcc-4.6-20101009/gcc/java/verify-impl.c:3306
#5  0x080eaf4a in verify_jvm_instructions_new (jcf=0xb75ec000,
byte_ops=0x8cfcbdf "+\266", length=74) at
/scratch/gcc-4.6-20101009/gcc/java/verify-glue.c:498
#6  0x080e04f9 in expand_byte_code (jcf=0xb75ec000, method=0xb75ead00) at
/scratch/gcc-4.6-20101009/gcc/java/expr.c:3155
#7  0x080faa5c in parse_class_file () at
/scratch/gcc-4.6-20101009/gcc/java/jcf-parse.c:1658
#8  0x080fb325 in java_parse_file (set_yydebug=0) at
/scratch/gcc-4.6-20101009/gcc/java/jcf-parse.c:1970
#9  0x0841a076 in compile_file (argc=34, argv=0xbffff504) at
/scratch/gcc-4.6-20101009/gcc/toplev.c:919
#10 do_compile (argc=34, argv=0xbffff504) at
/scratch/gcc-4.6-20101009/gcc/toplev.c:2363
#11 toplev_main (argc=34, argv=0xbffff504) at
/scratch/gcc-4.6-20101009/gcc/toplev.c:2423
#12 0x08106deb in main (argc=34, argv=0xbffff504) at
/scratch/gcc-4.6-20101009/gcc/main.c:36
(gdb)


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

* [Bug java/46059] internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions
  2010-10-17 18:19 [Bug bootstrap/46059] New: internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions baryluk at smp dot if.uj.edu.pl
  2010-10-17 19:42 ` [Bug bootstrap/46059] " baryluk at smp dot if.uj.edu.pl
@ 2010-10-21 23:06 ` baryluk at smp dot if.uj.edu.pl
  1 sibling, 0 replies; 3+ messages in thread
From: baryluk at smp dot if.uj.edu.pl @ 2010-10-21 23:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Witold Baryluk <baryluk at smp dot if.uj.edu.pl> 2010-10-21 23:06:00 UTC ---
gcc 4.5.1 with the same options compiled on this machine without problems.


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

end of thread, other threads:[~2010-10-21 23:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 18:19 [Bug bootstrap/46059] New: internel compiler error when compiling libjava/gnu/awt/LightweightRedirector.java with -finline-functions baryluk at smp dot if.uj.edu.pl
2010-10-17 19:42 ` [Bug bootstrap/46059] " baryluk at smp dot if.uj.edu.pl
2010-10-21 23:06 ` [Bug java/46059] " baryluk at smp dot if.uj.edu.pl

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