[GCC-XML] internal error with 0.9.0

Brad King brad.king at kitware.com
Thu Feb 14 10:28:43 EST 2008

Steve Vinoski wrote:
> Right, debugging gccxml_cc1plus instead of gccxml let me hit the
> breakpoint, but I didn't get very far after that. I'm not very
> familiar with the innards of gcc, so debugging it is not easy.
> But given that g++ 4.2 doesn't have any issues with that code, I
> thought maybe I could look through recent gcc patches to find the fix.
> I looked through a number of patches and also through the gcc sources
> a fair bit, but so far, no luck.

I found the problem.  It is in fact a bug in GCC 4.2's mangle.c but it 
is exposed only by GCC-XML's call to it.  Somehow mangle.c reaches a 
case where it assumes that an enumeration value will be a simple integer 
expression when in your example it is a less-than-comparison expression.

I've committed a hack to work around the issue:

/cvsroot/GCC_XML/gccxml/GCC/gcc/cp/mangle.c,v  <--  mangle.c
new revision: 1.3; previous revision: 1.2


More information about the gccxml mailing list