This works w/GCJ 3.3 Attaching test case. Øyvind [Output deleted] org/eclipse/swt/custom/WrappedContent.java:155: warning: unreachable bytecode fr om 138 to before 141 c:\temp/cc4obaaa.s: Assembler messages: c:\temp/cc4obaaa.s:1090314: Error: symbol `__GLOBAL__I__ZN3org6apache6regexp31Ch aracterArrayCharacterIterator6class$E' is already defined
Created attachment 4903 [details] Contains example case
I can reproduce this in the mainline (20031007) on powerpc-apple-darwin7.0 so this is a generic bug.
Could not reproduce with gcc 3.4 20030930 on linux x86 native, so the bug may have been introduced since then.
Note both Darwin and cygwin do not support weak symbols so it might be related to that.
Might be fixed by: * varasm.c (notice_global_symbol): Fix handling of variables; avoid re-computing of variable. Can you try again, I would but I am tracking down another bug?
Compiling GCC isn't my forte. I tried to compile GCC 3.4 from CVS, but it failed today: /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:74: warning: no previous prototype for `__gthr_win32_once' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:105: warning: no previous prototype for `__gthr_win32_key_create' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:124: warning: no previous prototype for `__gthr_win32_key_delete' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:130: warning: no previous prototype for `__gthr_win32_getspecific' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:141: warning: no previous prototype for `__gthr_win32_setspecific' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:147: warning: no previous prototype for `__gthr_win32_mutex_init_function' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:154: warning: no previous prototype for `__gthr_win32_mutex_lock' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:163: warning: no previous prototype for `__gthr_win32_mutex_trylock' /home/oyvind/gcc/gcc/gcc/config/i386/gthr-win32.c:172: warning: no previous prototype for `__gthr_win32_mutex_unlock' m
*** Bug 12858 has been marked as a duplicate of this bug. ***
>Might be fixed by: > * varasm.c (notice_global_symbol): Fix handling of variables; avoid > re-computing of variable. > >Can you try again, I would but I am tracking down another bug? I guess it still happens, since the bug I reported was marked as a duplicate of this one and that was a freshly compiled GCC 3.4 from CVS as of today. Bug 12858 - marked as duplicate Øyvind
I can't duplicate this on Linux. Please use -save-temps and let me have the .s file.
I should say this has to be with no weak symbols in the target like powerpc-apple-darwin and i686-pc-cygwin.
I should say this has to be with no weak symbols in the target like powerpc-apple-darwin and i686-pc-cygwin. Also this is really a middle-end problem.
This is strangerer, and strangerer. When I add the -save-temps argument I get no error message. And probably an invalid output. the .s file is too big to attach to this bug- report. Although I have used two different computers(the main difference being 256MB vs. 512MB ram) for testing against this problem, I have a sneaking suspicion that this compile takes way longer than normal. C:\temp\testgcc34>\wingcc\bin\gcj -save-temps -c -fjni -o libs.o modified_swt.j ar jakarta-regexp-1.2.jar C:\temp\testgcc34>dir Volume in drive C has no label. Volume Serial Number is 78B4-9509 Directory of C:\temp\testgcc34 11.11.2003 18:41 <DIR> . 11.11.2003 18:41 <DIR> .. 11.11.2003 18:41 27 314 131 ccimaaaajx.s 11.11.2003 18:18 87 compile.cmd 20.12.2002 16:24 29 053 jakarta-regexp-1.2.jar 11.11.2003 18:41 288 libs.o 01.07.2003 08:48 1 001 678 modified_swt.jar 5 File(s) 28 345 237 bytes 2 Dir(s) 19 183 005 696 bytes free C:\temp\testgcc34>zip -r temps *.s adding: ccimaaaajx.s (deflated 89%)
I verified that the same problem happens with my Linux -> Windows cross compiler, so at least the problem should be debuggable on Linux. My Linux->Windows cross compiler is built per Mohans instructions. Øyvind
Has anyone been able to figure out roughly when this regression was introduced? It would be useful to know what patch caused it.
Created attachment 5167 [details] I stripped away as much as I could from this jar while retaining the reproducable test case Command line: \wingcc\bin\gcj -c -fjni -o libs.o modified_swt.jar Output: c:\temp/ccsJaaaa.s: Assembler messages: c:\temp/ccsJaaaa.s:116134: Error: symbol `__GLOBAL__I__ZN3org7eclipse3swt8graphi cs5ColorC1Ev' is already defined
Created attachment 5173 [details] Narrowing in on the problem C:\Temp\foo>\wingcc\bin\gcj -o xxx.o -fjni -c test.jar c:\temp/cc6Haaaa.s: Assembler messages: c:\temp/cc6Haaaa.s:1005: Error: symbol `__GLOBAL__I__ZN3org7eclipse3swt8SWTError C1EiPN4java4lang6StringE' is already defined
Created attachment 5174 [details] Test case boiled down to a single trivial class C:\Temp\foo>\wingcc\bin\gcj -o xxx.o -fjni -c test.jar c:\temp/ccMHaaaa.s: Assembler messages: c:\temp/ccMHaaaa.s:235: Error: symbol `__GLOBAL__I__ZN3FooC1EiPN4java4lang6Strin gE' is already defined The source: public class Foo extends Error { public int code; public Throwable throwable; public Foo (int code, String message) { super (message); this.code = code; } }
If I unzip Foo.class and compile it, I do not get an error. C:\Temp\foo>unzip test.jar Archive: test.jar replace META-INF/MANIFEST.MF? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: META-INF/MANIFEST.MF inflating: Foo.class inflating: .classpath inflating: .project C:\Temp\foo>\wingcc\bin\gcj -o xxx.o -fjni -c Foo.class
Ah! The problem seems to be files in the jar which start with "." C:\Temp\foo>\wingcc\bin\gcj -o xxx.o -fjni -c test.jar c:\temp/cceAaaaa.s: Assembler messages: c:\temp/cceAaaaa.s:235: Error: symbol `__GLOBAL__I__ZN3FooC1EiPN4java4lang6Strin gE' is already defined C:\Temp\foo>zip -d test.jar .* deleting: .classpath deleting: .project C:\Temp\foo>\wingcc\bin\gcj -o xxx.o -fjni -c test.jar C:\Temp\foo>
This is boot.jar from Eclipse 3.0M4: http://download.berlios.de/pub/mldonkey/z/boot.jar This is gcc 3.4 (win32): gcc version 3.4 20031109 (experimental) gcj -c boot.jar -o boot.o C:\DOCUME~1\Main\LOCALS~1\Temp/ccUFdaaa.s: Assembler messages: C:\DOCUME~1\Main\LOCALS~1\Temp/ccUFdaaa.s:94423: Error: symbol `__GLOBAL__I__ZN3org7eclipse4core4boot10BootLoader18__U3c_clinit__U3e_Ev' is already defined Works fine with 3.3.1. There are no .* files in boot.jar that I can see.
Subject: Bug 12548 CVSROOT: /cvs/gcc Module name: gcc Changes by: membar@gcc.gnu.org 2003-11-26 01:34:32 Modified files: gcc/java : ChangeLog resource.c Log message: PR java/12548 * resource.c (write_resource_constructor): Append "_resource" to constructor identifier name. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1300&r2=1.1301 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/resource.c.diff?cvsroot=gcc&r1=1.8&r2=1.9
Fixed for 3.4.