When you debug gccxml, it spawns another process to handle the actual compile step. You have to debug that spawned process. Use &quot;--debug&quot; (I think) to see the command line for the spawned process. Or look through the source code for gccxml&#39;s main to figure out how to grok the command line for the spawned process...<div>
<br class="webkit-block-placeholder"></div><div>Or, instead of debuggers/breakpoints, use good old-fashioned print statements to send some diagnostic output to stdout...</div><div><br class="webkit-block-placeholder"></div>
<div><br><br><div><span class="gmail_quote">On 2/10/08, <b class="gmail_sendername">Steve Vinoski</b> &lt;<a href="mailto:vinoski@ieee.org">vinoski@ieee.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">
Great, thanks. The code causing the internal error actually comes from<br>the Boost library, file boost/pending/integer_log2.hpp from Boost<br>1.34, and specifically this construct:<br><br>template &lt;int p, int n&gt;<br>
struct max_pow2_less {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enum { c = 2*n &lt; p };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;static const int value = c ? (max_pow2_less&lt; c*p, 2*c*n&gt;::value) : n;<br>};<br><br>It&#39;s specifically the definition of the &quot;value&quot; static const int<br>
variable that causes the problem. Here&#39;s one possible workaround:<br><br>enum { c = 2*n &lt; p, next_p = c*p, next_n = 2*c*n };<br>static const int value = c ? (max_pow2_less&lt; next_p, next_n&gt;::value) : n;<br><br>
I tried to put a breakpoint at tree.c:4582, indicated in the internal<br>compiler error message, but it never hit it.<br><br>Any further suggestions for how to proceed with tracking this down and<br>fixing it?<br><br>thanks,<br>
--steve<br><br>On 2/9/08, David Cole &lt;<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>&gt; wrote:<br>&gt; When configuring with CMake, set CMAKE_BUILD_TYPE to Debug for a makefile<br>&gt; based build. (Or if building with Visual Studio or Xcode, just build the<br>
&gt; Debug configuration...)<br>&gt;<br>&gt;&nbsp;&nbsp;HTH,<br>&gt; Dave<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 2/9/08, Steve Vinoski &lt;<a href="mailto:vinoski@ieee.org">vinoski@ieee.org</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Apologies if this has already been covered; I just joined the list and<br>
&gt; &gt; searched for this issue but didn&#39;t find anything.<br>&gt; &gt;<br>&gt; &gt; With gccxml 0.9.0 built against sources fresh out of cvs and running<br>&gt; &gt; against a gcc 4.2.2 compiler installation, I see this error with a<br>
&gt; &gt; number of files that compile fine with straight g++ 4.2.2:<br>&gt; &gt;<br>&gt; &gt; internal compiler error: tree check: expected integer_cst, have<br>&gt; &gt; lt_expr in tree_int_cst_sgn, at tree.c:4582<br>&gt; &gt;<br>
&gt; &gt; Has anyone else seen this? If not, any recommendations for debugging<br>&gt; &gt; it? Sending preprocessed output isn&#39;t possible. Are there instructions<br>&gt; &gt; available anywhere for building a debuggable gccxml?<br>
&gt; &gt;<br>&gt; &gt; thanks,<br>&gt; &gt; --steve<br>&gt; &gt; _______________________________________________<br>&gt; &gt; gccxml mailing list<br>&gt; &gt; <a href="mailto:gccxml@gccxml.org">gccxml@gccxml.org</a><br>&gt; &gt; <a href="http://www.gccxml.org/mailman/listinfo/gccxml">http://www.gccxml.org/mailman/listinfo/gccxml</a><br>
&gt; &gt;<br>&gt;<br>&gt;<br></blockquote></div><br>&nbsp;</div>