Bug 56372

Summary: Missing libgcj caused ICE (stack overflow) in jc1
Product: gcc Reporter: Karlson2k <k2k>
Component: javaAssignee: Not yet assigned to anyone <unassigned>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: P3    
Version: 4.7.2   
Target Milestone: ---   
Host: i686-pc-mingw32 Target: i686-w64-mingw32, x86_64-w64-mingw32
Build: i686-pc-mingw32 Known to work:
Known to fail: Last reconfirmed:

Description Karlson2k 2013-02-18 09:06:58 UTC
When building cross-compiler, this command caused stack overflow

i686-pc-mingw32-gcj -o ecjx.exe -findirect-dispatch --main=org.eclipse.jdt.internal.compiler.batch.GCCMain ../../../../source/gcc-4.7.2/libjava/../ecj.jar ecjx.o

That internally calls

"t:/dvlp/mingw-w64-i686/libexec/gcc/i686-w64-mingw32/4.7.2/jc1.exe" "../../../../source/gcc-4.7.2/libjava/../ecj.jar" "-fhash-synchronization" "-fuse-divide-subroutine" "-fcheck-references" "-fuse-boehm-gc" "-fkeep-inline-functions" "-quiet" "-dumpbase" "ecj.jar" "-mtune=generic" "-march=pentium3" "-auxbase" "ecj" "-g1" "-findirect-dispatch" "-fbootclasspath=./;T:/dvlp/mingw-w64-i686/share/java/libgcj-4.7.2.jar" "-o" "C:\Users\UserName\AppData\Local\Temp\ccgbcsCW.s"

If libgcj-4.7.2.jar is missing than jc1.exe is closed with error (stack overflow). Even with increased stack to 140 MB.
Situation with missing libgcj is not valid, but I believe that jc1 must print some error message and not to crash.