------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  
2005-03-16 14:34 -------
Subject: Re:  [4.0 Regression] Bootstrap failure

> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-16 
> 06:26 -------
> The following code is another example:
> typedef int (*fptr_t) (void);
> 
> int __canonicalize_funcptr_for_compare (fptr_t t)
> {
>   return (int)(t) == -1;
> }
> 
> Hmm, I have not traced it yet but maybe we should not call 
> __canonicalize_funcptr_for_compare when 
> we are comparing against constants.

Well certainly when the function pointer has been cast to an int.
In PR middle-end/17564, we changed do_compare_and_jump to only
canonicalize function pointers in a comparison if both sides are
function pointers.

Dave


-- 


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

Reply via email to