mingw32-c++ (GCC) 4.4.0 20081031 (experimental) internal compiler error: in change_decl_assembler_name, at cgraph.c:1252 C++ source is here: <http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/desktop/desktop.cpp?revision=34284&content-type=text%2Fplain>
Created attachment 16632 [details] Preprocessed source
This a target bug (stdcall symbol name decorati0on on windows targets)
Patch at: http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00321.html
(In reply to comment #3) Ok, thanks.
(In reply to comment #3) > Patch at: > http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00321.html > That patch also fixes the FAIL of testsuite\g++.old-deja\g++.dg\other>g++ pr35504.C . Currently it fails on mingw32 and cygwin with: Warning: resolving non-virtual thunk to c3::method5()@4 by linking to non-virtual thunk to c3::method5() Use --enable-stdcall-fixup to disable these warnings Use --disable-stdcall-fixup to disable these fixups c:\tmp/ccisCRqc.o:pr35504.C:(.rdata$_ZTV2c3[vtable for c3]+0x44): undefined reference to `@_ZThn8_N2c37method4Ev@4' collect2: ld returned 1 exit status
(In reply to comment #5) GCC 4.3.2 suffers from the same bug.
Created attachment 16756 [details] Smaller test case gcc -c -v -funit-at-a-time -nostdinc testcase.c Using built-in specs. Target: mingw32 Configured with: ../gcc-4.1.3/configure --prefix=/gcc-4.1.3 --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --build=mingw32 --enable-languages=c,c++ --enable-checking=release --enable-threads=win32 --disable-win32-registry --disable-nls --disable-shared Thread model: win32 gcc version 4.1.3 20071015 (prerelease) c:/users/hyperion/rosbe/4.1.3/bin/../libexec/gcc/mingw32/4.1.3/cc1.exe -quiet -nostdinc -v -iprefix c:\users\hyperion\rosbe\4.1.3\bin\../lib/gcc/mingw32/4.1.3/ testcase.c -quiet -dumpbase testcase.c -auxbase testcase -version -funit-at-a-time -o C:\Users\Hyperion\AppData\Local\Temp/cczKM08O.s #include "..." search starts here: #include <...> search starts here: C:/Users/Hyperion/RosBE/4.1.3/include C:/Users/Hyperion/RosBE/4.1.3/lib/gcc/mingw32/4.1.3/include End of search list. GNU C version 4.1.3 20071015 (prerelease) (mingw32) compiled by GNU C version 4.1.3 20071015 (prerelease). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 3f527ff7c87fdc28aecf612037bc62b2 testcase.c: In function 'y': testcase.c:10: warning: y renamed after being referenced in assembly c:/users/hyperion/rosbe/4.1.3/bin/../lib/gcc/mingw32/4.1.3/../../../../mingw32/bin/as.exe -o testcase.o C:\Users\Hyperion\AppData\Local\Temp/cczKM08O.s
I have added a test case that shows a closely related issue with nested functions, -funit-at-a-time and unreferenced file-scope externs (yes, if you remove "int x = 0;" the warning goes away) The "%D renamed after being referenced in assembly" warning cannot be disabled, either, so this is a bit problematic for sources compiled with -Werror
GCC 4.3.2 and 4.4.0 compile the above testcase without warnings.
Subject: Bug 38054 Author: dannysmith Date: Tue Dec 2 08:02:07 2008 New Revision: 142347 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142347 Log: PR target/38054 * config/i386/winnt.c (i386_pe_encode_section_info): Condition stdcall decoration of function RTL names here on Ada language. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/winnt.c
I have committed a patch to 4.4.0 to fix bug in compilation of desktop.cpp
Subject: Bug 38054 Author: dannysmith Date: Thu Dec 4 07:13:05 2008 New Revision: 142429 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142429 Log: Backport from mainline: PR target/38054 * config/i386/winnt.c (i386_pe_encode_section_info): Condition stdcall decoration of function RTL names here on Ada language. Modified: branches/gcc-4_3-branch/gcc/ChangeLog branches/gcc-4_3-branch/gcc/config/i386/winnt.c
Fixed in 4.3.3