This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj/sparc64?


Tom Tromey wrote:
>>>>>> "Jay" == Jay  <jayk123@hotmail.com> writes:
> 
> Jay> This is an incomplete bug report.
> Jay>  unified gcc 4.3.1/binutils 2.18/gmp/mpfr tree: 
> Jay>   -bash-3.00$ gcc -v  
> Jay>   Using built-in specs.  
> Jay>   Target: sparc-sun-solaris2.10  
> 
> [...]
> Jay>   /.libs/HTML_401F.o  
> Jay>   gcj: Internal error: Segmentation Fault (program jc1)  
> Jay>   Please submit a full bug report.  
> 
> Knowing this particular file, maybe gcj just ran out of memory.
> Anyway, please file in bugzilla.  If you can include a jc1 stack
> trace, that would be helpful.
> 
> Jay> I shouldn't need this MAKEINFO=echo, but I do for some reason.
> Jay> btw, it'd be cool if one could easily add languages later, remove
> Jay> -disable-multilib later, etc.  ie: "reconfigure slightly
> Jay> differently/larger && make" and have it be super duper smart
> Jay> about what to rebuild And -disable-libiconv would be nice.
> 
> Send bug reports and/or patches...

I know what this is.  It's one of the optimization passes recursing too
deeply and blowing the stack.  It usually happens if the compiler has
been built with -O0.

Try this patch.

Andrew.


Index: tree-vrp.c
===================================================================
--- tree-vrp.c	(revision 136670)
+++ tree-vrp.c	(working copy)
@@ -4049,6 +4049,8 @@
    the predicate operands, an assert location node is added to the
    list of assertions for the corresponding operands.  */

+static size_t depth;
+
 static bool
 find_conditional_asserts (basic_block bb, tree last)
 {
@@ -4062,6 +4064,10 @@
   need_assert = false;
   bsi = bsi_for_stmt (last);

+  depth++;
+  if (depth > 500)
+    goto ret;
+
   /* Look for uses of the operands in each of the sub-graphs
      rooted at BB.  We need to check each of the outgoing edges
      separately, so that we know what kind of ASSERT_EXPR to
@@ -4121,6 +4127,8 @@
   FOR_EACH_SSA_TREE_OPERAND (op, last, iter, SSA_OP_USE)
     SET_BIT (found_in_subgraph, SSA_NAME_VERSION (op));

+ ret:
+  depth--;
   return need_assert;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]