#1604 cc1plus hangs when compiling

OTHER
closed
nobody
gcc (462)
Bug
fixed
Unknown
False
2013-02-08
2011-11-28
No

After trying to compile one of old projects I ran into the situation when mingw32-g++ silently hanged up. After ah hour of research I refined the whole situation to this simple test file (evidently the main reason was the erratum; but it was better to have the compile error and crashed build here then to have three hours of senseless CPU torturing).

/////////////////////////////////////////
// test.cpp
class A;

template <class T>
class B
{
friend __attribute__((cdecl)) A& operator >>(A& a, B& b)
{
return a;
}
};
//
/////////////////////////////////////////

Compiled with command:
mingw32-g++ -v test.cpp

Resulting output:

Using built-in specs.
COLLECT_GCC=mingw32-g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=i386' '-march=i386'
c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/cc1plus.exe -quiet -v -iprefix c:\mingw\bin\../lib/gcc/mingw32/4.5.2/ appdict.cpp -quiet -dumpbase appdict.cpp -mtune=i386 -march=i386 -auxbase appdict -version -o C:\DOCUME~1\9335~1\LOCALS~1\Temp\ccenojSj.s
GNU C++ (GCC) version 4.5.2 (mingw32)
compiled by GNU C version 4.5.2, GMP version 5.0.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../mingw32/include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++/mingw32"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include/c++/backward"
ignoring duplicate directory "/mingw/lib/gcc/mingw32/4.5.2/../../../../include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/include-fixed"
ignoring nonexistent directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.5.2/../../../../mingw32/include"
ignoring duplicate directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/mingw32
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include/c++/backward
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include
c:\mingw\bin\../lib/gcc/mingw32/4.5.2/include-fixed
End of search list.
GNU C++ (GCC) version 4.5.2 (mingw32)
compiled by GNU C version 4.5.2, GMP version 5.0.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: bba7c68567cab1560329ee702fa8a945
^C

Discussion

  • Earnie Boyd

    Earnie Boyd - 2011-11-28

    I confirm that this happens with 4.6.1 as well. cc1plus.exe is clocking CPU cycles with no I/O being registered as per the task manager.

     
  • Earnie Boyd

    Earnie Boyd - 2011-11-28
    • assigned_to: nobody --> cstrauss
    • summary: gcc hangs when compiling --> cc1plus hangs when compiling
     
  • Cesar Strauss

    Cesar Strauss - 2011-11-29

    The hang still happens with the latest sources. It also occurs in 4.6.1 in 64-bit Linux, so it is not MinGW specific.

    Could you create a bug report on http://gcc.gnu.org/bugzilla ?

    If you do, please tell us the gcc bug number afterwards so we can track its progress.

    Thanks,

    Cesar

     
  • Keith Marshall

    Keith Marshall - 2011-11-29

    FWIW, it's not even specific to gcc-4.6.x; the OP's test case also causes gcc-4.4.5 to hang on 32-bit LinuxMint-10 (ubuntu-based). No problem, however, with gcc-3.4.5 mingw32-g++ cross-compiler, on the same host.

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-08

    This has been resolved upstream.

     
  • Earnie Boyd

    Earnie Boyd - 2013-02-08
    • status: open --> closed
    • assigned_to: Cesar Strauss --> nobody
    • milestone: --> OTHER
    • type: --> Bug
    • resolution: --> fixed
    • category: --> Unknown
    • patch_attached: --> False
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks