Internal Compiler Error

Hello All,
Can anybody tell me why the enclosed code segment causes a gcc internal
error? I’m running ntox86-gcc v.2.95.3 on a WIN2K machine from the Momentics
IDE. Does anyone else get this error?
The final error is:

D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Internal compiler error.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Please submit a full bug
report.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: See
URL:http://www.gnu.org/software/gcc/bugs.html for instructions.
cc: D:/QNXsdk/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught
signal 33

Code Segment:


#include
#include

template
struct A{
typedef int *pInt_t;
};

typedef std::map<int,std::string> Table_t;

template
class B{
public:
typedef A::pInt_t Handle_t;

B(Handle_t a=NULL,Handle_t b=NULL){/nothing/ }

void Run(){/* do work */}
private:
Table_t m_Table;
};

int main(){
B state;
state.Run();
return 0;
}

I have a hunch that this is caused by overrunning the maximum symbol length!
BTW, What is the maximum symbol length in GCC?

-A.G

“Ali Ghorashi” <ali.ghorashi@nospam.org> wrote in message
news:cmo661$lrr$1@inn.qnx.com

Hello All,
Can anybody tell me why the enclosed code segment causes a gcc internal
error? I’m running ntox86-gcc v.2.95.3 on a WIN2K machine from the
Momentics
IDE. Does anyone else get this error?
The final error is:

D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Internal compiler error.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Please submit a full bug
report.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: See
URL:> http://www.gnu.org/software/gcc/bugs.html> > for instructions.
cc: D:/QNXsdk/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught
signal 33

Code Segment:

#include <map
#include <string

template <class T
struct A{
typedef int *pInt_t;
};

typedef std::map<int,std::string> Table_t;

template<class T
class B{
public:
typedef A::pInt_t Handle_t;

B(Handle_t a=NULL,Handle_t b=NULL){/nothing/ }

void Run(){/* do work */}
private:
Table_t m_Table;
};

int main(){
B state;
state.Run();
return 0;
}





\

Only the debug (i.e “-g”) compile seems to exhibit this problem.

“Ali Ghorashi” <ali.ghorashi@nospam.org> wrote in message
news:cmo661$lrr$1@inn.qnx.com

Hello All,
Can anybody tell me why the enclosed code segment causes a gcc internal
error? I’m running ntox86-gcc v.2.95.3 on a WIN2K machine from the
Momentics
IDE. Does anyone else get this error?
The final error is:

D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Internal compiler error.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Please submit a full bug
report.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: See
URL:> http://www.gnu.org/software/gcc/bugs.html> > for instructions.
cc: D:/QNXsdk/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught
signal 33

Code Segment:

#include <map
#include <string

template <class T
struct A{
typedef int *pInt_t;
};

typedef std::map<int,std::string> Table_t;

template<class T
class B{
public:
typedef A::pInt_t Handle_t;

B(Handle_t a=NULL,Handle_t b=NULL){/nothing/ }

void Run(){/* do work */}
private:
Table_t m_Table;
};

int main(){
B state;
state.Run();
return 0;
}





\

Well, after 2 days of messing around with this problem, I finally found a
work around. If I build the debug version with any optimization (-O1 or
greater), the problem disappears!!!


“Ali Ghorashi” <ali.ghorashi@nospam.org> wrote in message
news:cmo661$lrr$1@inn.qnx.com

Hello All,
Can anybody tell me why the enclosed code segment causes a gcc internal
error? I’m running ntox86-gcc v.2.95.3 on a WIN2K machine from the
Momentics
IDE. Does anyone else get this error?
The final error is:

D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Internal compiler error.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: Please submit a full bug
report.
D:/QNXsdk/target/qnx6/usr/include/cpp/xmemory:35: See
URL:> http://www.gnu.org/software/gcc/bugs.html> > for instructions.
cc: D:/QNXsdk/host/win32/x86/usr/lib/gcc-lib/ntox86/2.95.3/cc1plus caught
signal 33

Code Segment:

#include <map
#include <string

template <class T
struct A{
typedef int *pInt_t;
};

typedef std::map<int,std::string> Table_t;

template<class T
class B{
public:
typedef A::pInt_t Handle_t;

B(Handle_t a=NULL,Handle_t b=NULL){/nothing/ }

void Run(){/* do work */}
private:
Table_t m_Table;
};

int main(){
B state;
state.Run();
return 0;
}





\