java/io/natFile.cc:106: internal compiler error: verify_ssa failed.

Jan Hubicka jh@suse.cz
Mon Sep 6 12:21:00 GMT 2004


> > On Sun, 2004-09-05 at 13:18, Graham Stott wrote:
> > > Diego,
> > > 
> > > > Diego Novillo wrote:
> > > > 
> > > >> Can you reproduce this with -fno-ivopts?
> > > > 
> > > no it compiles fine with -fno-ivopts
> > > 
> > Then Zdenek needs to fix this problem as well.  Honza, since Zdenek is
> > out could you please take care of this problem and the other one I
> > reported earlier today?
> > 
> > http://gcc.gnu.org/ml/gcc-bugs/2004-09/msg00419.html
> > http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00523.html
> 
> Yes, I am looking into it.

Hi,
I am testing the attached patch.  So far I found two problems: Java does
not initialize the unsigned_type_node but it seems to be sanier to not
use the frontend types anyway so I repleaced them with intSI/intDI
nodes.

Other problem is in cost computing code that needs to put in fake
DECL_RTL in order to expand the expression and compute the cost.  THe
failing case is when address is taken of something and Zdenek just puts
in the DECL_RTL.

I intend to commit the patches if the testing suceeds to unbreak the
bootstrap but I will send proper email to patches list about this.  This
is just in case someone sees something obvious with it.

Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.2
diff -c -3 -p -r2.2 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	5 Sep 2004 15:24:15 -0000	2.2
--- tree-ssa-loop-ivopts.c	6 Sep 2004 12:15:37 -0000
*************** add_standard_iv_candidates (struct ivopt
*** 1561,1574 ****
  {
    /* Add 0 + 1 * iteration candidate.  */
    add_candidate (data,
! 		 fold_convert (unsigned_type_node, integer_zero_node),
!       		 fold_convert (unsigned_type_node, integer_one_node),
  		 true, NULL);
  
    /* The same for a long type.  */
    add_candidate (data,
! 		 fold_convert (long_unsigned_type_node, integer_zero_node),
! 		 fold_convert (long_unsigned_type_node, integer_one_node),
  		 true, NULL);
  }
  
--- 1561,1574 ----
  {
    /* Add 0 + 1 * iteration candidate.  */
    add_candidate (data,
! 		 fold_convert (unsigned_intSI_type_node, integer_zero_node),
!       		 fold_convert (unsigned_intSI_type_node, integer_one_node),
  		 true, NULL);
  
    /* The same for a long type.  */
    add_candidate (data,
! 		 fold_convert (unsigned_intDI_type_node, integer_zero_node),
! 		 fold_convert (unsigned_intDI_type_node, integer_one_node),
  		 true, NULL);
  }
  
*************** seq_cost (rtx seq)
*** 1883,1888 ****
--- 1883,1906 ----
    return cost;
  }
  
+ /* Produce DECL_RTL for object obj so it looks like it is stored in memory.  */
+ static rtx
+ produce_memory_decl_rtl (tree obj, int *regno)
+ {
+   rtx x;
+   if (!obj)
+     abort ();
+   if (TREE_STATIC (obj) || DECL_EXTERNAL (obj))
+     {
+       const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj));
+       x = gen_rtx_SYMBOL_REF (Pmode, name);
+     }
+   else
+     x = gen_raw_REG (Pmode, (*regno)++);
+ 
+   return gen_rtx_MEM (DECL_MODE (obj), x);
+ }
+ 
  /* Prepares decl_rtl for variables referred in *EXPR_P.  Callback for
     walk_tree.  DATA contains the actual fake register number.  */
  
*************** prepare_decl_rtl (tree *expr_p, int *ws,
*** 1895,1900 ****
--- 1913,1929 ----
  
    switch (TREE_CODE (*expr_p))
      {
+     case ADDR_EXPR:
+       for (expr_p = &TREE_OPERAND (*expr_p, 0);
+ 	   (handled_component_p (*expr_p)
+ 	    || TREE_CODE (*expr_p) == REALPART_EXPR
+ 	    || TREE_CODE (*expr_p) == IMAGPART_EXPR);
+ 	   expr_p = &TREE_OPERAND (*expr_p, 0));
+       obj = *expr_p;
+       if (DECL_P (obj))
+         x = produce_memory_decl_rtl (obj, regno);
+       break;
+ 
      case SSA_NAME:
        *ws = 0;
        obj = SSA_NAME_VAR (*expr_p);
*************** prepare_decl_rtl (tree *expr_p, int *ws,
*** 1912,1929 ****
  	break;
  
        if (DECL_MODE (obj) == BLKmode)
! 	{
! 	  if (TREE_STATIC (obj)
! 	      || DECL_EXTERNAL (obj))
! 	    {
! 	      const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj));
! 	      x = gen_rtx_SYMBOL_REF (Pmode, name);
! 	    }
! 	  else
! 	    x = gen_raw_REG (Pmode, (*regno)++);
! 
! 	  x = gen_rtx_MEM (DECL_MODE (obj), x);
! 	}
        else
  	x = gen_raw_REG (DECL_MODE (obj), (*regno)++);
  
--- 1941,1947 ----
  	break;
  
        if (DECL_MODE (obj) == BLKmode)
! 	x = produce_memory_decl_rtl (obj, regno);
        else
  	x = gen_raw_REG (DECL_MODE (obj), (*regno)++);
  



More information about the Gcc-bugs mailing list