[Bug middle-end/42749] [4.5 Regression] -O2 and verify_stmts failed again

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Sat Jan 16 13:19:00 GMT 2010



------- Comment #11 from rguenther at suse dot de  2010-01-16 13:19 -------
Subject: Re:  [4.5 Regression] -O2 and verify_stmts
 failed again

On Sat, 16 Jan 2010, rakdver at gcc dot gnu dot org wrote:

> 
> 
> ------- Comment #10 from rakdver at gcc dot gnu dot org  2010-01-16 12:53 -------
>  /* Reject a tailcall if the type conversion might need
> 285                       additional code.  */
> 286                    if (gimple_assign_cast_p (stmt)
> 287                        && TYPE_MODE (TREE_TYPE (dest)) != TYPE_MODE
> (TREE_TYPE (src_var)))
> 288                      return false;
> 
> This is suspicious; replacing the weird TYPE_MODE check with
> useless_type_conversion_p fixes the problem.

Correct, but for useless_type_conversion_p we can reject any conversions
in the IL since only !useless_type_conversion_p remain.

I suppose the code was explicitly trying to allow sign-changing
(but not precision changing as it does), or conversion to/from
pointers.

Thus, if you want to go the useless_type_conversion_p route simply
reject all conversions and only allow plain SSA name copies...

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42749



More information about the Gcc-bugs mailing list