[GCC-XML] internal error with 0.9.0
David Cole
david.cole at kitware.com
Sun Feb 10 16:56:07 EST 2008
When you debug gccxml, it spawns another process to handle the actual
compile step. You have to debug that spawned process. Use "--debug" (I
think) to see the command line for the spawned process. Or look through the
source code for gccxml's main to figure out how to grok the command line for
the spawned process...
Or, instead of debuggers/breakpoints, use good old-fashioned print
statements to send some diagnostic output to stdout...
On 2/10/08, Steve Vinoski <vinoski at ieee.org> wrote:
>
> Great, thanks. The code causing the internal error actually comes from
> the Boost library, file boost/pending/integer_log2.hpp from Boost
> 1.34, and specifically this construct:
>
> template <int p, int n>
> struct max_pow2_less {
> enum { c = 2*n < p };
> static const int value = c ? (max_pow2_less< c*p, 2*c*n>::value) :
> n;
> };
>
> It's specifically the definition of the "value" static const int
> variable that causes the problem. Here's one possible workaround:
>
> enum { c = 2*n < p, next_p = c*p, next_n = 2*c*n };
> static const int value = c ? (max_pow2_less< next_p, next_n>::value) : n;
>
> I tried to put a breakpoint at tree.c:4582, indicated in the internal
> compiler error message, but it never hit it.
>
> Any further suggestions for how to proceed with tracking this down and
> fixing it?
>
> thanks,
> --steve
>
> On 2/9/08, David Cole <david.cole at kitware.com> wrote:
> > When configuring with CMake, set CMAKE_BUILD_TYPE to Debug for a
> makefile
> > based build. (Or if building with Visual Studio or Xcode, just build the
> > Debug configuration...)
> >
> > HTH,
> > Dave
> >
> >
> >
> > On 2/9/08, Steve Vinoski <vinoski at ieee.org> wrote:
> > >
> > > Apologies if this has already been covered; I just joined the list and
> > > searched for this issue but didn't find anything.
> > >
> > > With gccxml 0.9.0 built against sources fresh out of cvs and running
> > > against a gcc 4.2.2 compiler installation, I see this error with a
> > > number of files that compile fine with straight g++ 4.2.2:
> > >
> > > internal compiler error: tree check: expected integer_cst, have
> > > lt_expr in tree_int_cst_sgn, at tree.c:4582
> > >
> > > Has anyone else seen this? If not, any recommendations for debugging
> > > it? Sending preprocessed output isn't possible. Are there instructions
> > > available anywhere for building a debuggable gccxml?
> > >
> > > thanks,
> > > --steve
> > > _______________________________________________
> > > gccxml mailing list
> > > gccxml at gccxml.org
> > > http://www.gccxml.org/mailman/listinfo/gccxml
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20080210/77938fd0/attachment-0001.html>
More information about the gccxml
mailing list