This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE in gcc 2.95.2 [mingw]
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: ICE in gcc 2.95.2 [mingw]
- From: "Priem, Gregory L" <gregory dot l dot priem at intel dot com>
- Date: Mon, 10 Jan 2000 12:44:07 -0800
I am trying to use COM using gcc 2.95.2 under mingw [packaged by Mumit
Khan], and am getting an ICE.
[I hope I RTFM'd enough to not waste anyone's time!]
g++ -v
Reading specs from
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\specs
gcc version 2.95.2 19991024 (release)
system:
MS Windows NT4 SP6a, 128M RAM
The minimized code I have is [full bzip2'ed .ii file is attached, so I did
not attempt to minimize win32 headers]:
------------ temp.cpp ----------------
#include "temp.h"
-------- end temp.cpp -------------
------------ temp.h -----------------
#include <objbase.h>
#include <oleidl.h>
class CUnknown
{
public:
// Constructor
CUnknown(IUnknown* pUnknownOuter) ;
// Destructor
virtual ~CUnknown() ;
} ;
#ifndef NOICE
class temp : public CUnknown,
public ISupportErrorInfo
#else
class temp : public ISupportErrorInfo,
public CUnknown
#endif
{
public:
// Constructor
temp(IUnknown* pUnknownOuter) ;
// Destructor
~temp() ;
} ;
-----------------end temp.h------------------
Output from code, as shown:
F:\temp>g++ -v --save-temps -fvtable-thunks -c temp.cpp
Reading specs from
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\specs
gcc version 2.95.2 19991024 (release)
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\cpp.exe -lang-c++
-v -iprefix e:\gcc-2.95.2\bin\..\lib/gcc-lib/i386-mingw32msvc\2.95.2\
-D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Di386 -D_WIN32
-DWIN32 -D__WIN32__ -D__MINGW32__=0.2 -D__MSVCRT__ -DWINNT -D_X86_=1
-D__STDC__=1 -D__stdcall=__attribute__((__stdcall__))
-D_stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__))
-D__declspec(x)=__attribute__((x)) -D__i386__ -D_WIN32 -D__WIN32__
-D__WIN32__ -D__MINGW32__=0.2 -D__MSVCRT__ -D__WINNT__ -D_X86_=1
-D__STDC__=1 -D__stdcall=__attribute__((__stdcall__))
-D___stdcall__=__attribute__((__stdcall__))
-D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x))
-D__i386 -D__WIN32 -D__WINNT -D___stdcall=__attribute__((__stdcall__))
-Asystem(winnt) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -remap
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ temp.cpp temp.ii
GNU CPP version 2.95.2 19991024 (release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\..\include
\g++-3
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\..\include
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\..\i386-mi
ngw32msvc\include
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\include
End of search list.
The following default directories have been omitted from the search path:
/usr/local/i386-mingw32/include
End of omitted list.
e:\gcc-2.95.2\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\cc1plus.exe
temp.ii -quiet -dumpbase temp.cc -version -fvtable-thunks -o temp.s
GNU C++ version 2.95.2 19991024 (release) (i386-mingw32msvc) compiled by GNU
C version 2.95.2 19991024 (release).
In file included from temp.cpp:7:
temp.h:33: Internal compiler error.
temp.h:33: Please submit a full bug report.
temp.h:33: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for
instructions.
If NOICE is defined, then it compiles fine. [ie: g++ -v --save-temps
-fvtable-thunks -c -DNOICE temp.cpp ]
I assume that the ICE is somehow due to the COM class not being listed first
in the inheritance chain. Looking through the archives, I saw
http://gcc.gnu.org/ml/gcc-patches/1999-06/msg00274.html which I thought
would give me an error message if the COM interface were not the left-most,
so perhaps this is not the issue. [Or maybe this made it into the mainline,
but not the 2.95 branch?]
tnx
-greg priem
<<temp.ii.bz2>>
temp.ii.bz2