This is the mail archive of the gcc-patches@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: [graphite] Fix PR37485


On Thu, 2 Oct 2008, Sebastian Pop wrote:

> Ping patches.
> 
> FYI, I've merged the graphite branch, and I've committed the
> attached fixes to the graphite branch.

IMHO the tree-ssa-loop-ivopts.c patch is wrong.  Which path
do we go to the failure?  It looks like we should instead
fix the type of comp earlier.  At least

      /* Otherwise, add the necessary computations to express
         the iv.  */
      op = fold_convert (ctype, cand->var_before);
      comp = fold_convert (utype,
                           build2 (incr_code, ctype, op,
                                   unshare_expr (step)));

doesn't look completely correct.

But you may want to try the following to detect latent type
problems with the testcase.

Richard.

2008-09-11  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (remove_useless_stmts): Verify stmts afterwards.
	(verify_stmts): Dispatch to gimple/type verification code.

Index: trunk/gcc/tree-cfg.c
===================================================================
*** trunk.orig/gcc/tree-cfg.c
--- trunk/gcc/tree-cfg.c
*************** remove_useless_stmts (void)
*** 2024,2029 ****
--- 2024,2034 ----
        remove_useless_stmts_1 (&gsi, &data);
      }
    while (data.repeat);
+ 
+ #ifdef ENABLE_TYPES_CHECKING
+   verify_types_in_gimple_seq (gimple_body (current_function_decl));
+ #endif
+ 
    return 0;
  }
  
*************** verify_stmts (void)
*** 4153,4158 ****
--- 4210,4221 ----
  		  err |= true;
  		}
  	    }
+ 
+ 	  if (verify_gimple_phi (phi))
+ 	    {
+ 	      debug_gimple_stmt (phi);
+ 	      err |= true;
+ 	    }
  	}
  
        for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); )
*************** verify_stmts (void)
*** 4189,4194 ****
--- 4252,4263 ----
  	    }
  
  	  err |= verify_stmt (&gsi);
+ 
+ 	  if (verify_types_in_gimple_stmt (gsi_stmt (gsi)))
+ 	    {
+ 	      debug_gimple_stmt (stmt);
+ 	      err |= true;
+ 	    }
  	  addr = walk_gimple_op (gsi_stmt (gsi), verify_node_sharing, &wi);
  	  if (addr)
  	    {


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