[Bug ipa/84947] UBSAN: ipcp_bits_lattice::meet_with(generic_wide_int<fixed_wide_int_storage<192> >, generic_wide_int<fixed_wide_int_storage<192> >, unsigned int) ../../gcc/ipa-cp.c:1058

jamborm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 29 13:21:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84947

--- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> 
> Does IPA-CP in any way handle jump functions of float types?

It does not create any jump functions tracking individual bits, we
only create that part of jump functions for integral and pointer
types.

(In reply to Martin Liška from comment #5)
> I can confirm it works for me:
> 
> diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
> index ee41a8d55b7..96fff686a3a 100644
> --- a/gcc/ipa-cp.c
> +++ b/gcc/ipa-cp.c
> @@ -1813,7 +1813,8 @@ propagate_bits_across_jump_function (cgraph_edge *cs,
> int idx,
>  
>    /* For K&R C programs, ipa_get_type() could return NULL_TREE.
>       Avoid the transform for these cases.  */
> -  if (!parm_type)
> +  if (!parm_type || !(INTEGRAL_TYPE_P (parm_type)
> +		      || POINTER_TYPE_P (parm_type)))
>      {
>        if (dump_file && (dump_flags & TDF_DETAILS))
>  	fprintf (dump_file, "Setting dest_lattice to bottom, because"
> 
> I'm leaving that to Martin.

It seems exactly the right thing to do, let me just push that negation
into the parenthesis, bootstrap and submit to the mailing list.
Thanks.


More information about the Gcc-bugs mailing list