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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Started with r238754 but removing that match.pd doesn't help, so the problem
> is elsewhere.
> 
> We optimize away zz1_1(D) != 0:
> 
>  __attribute__((fn spec (". w ")))
>  void shape_cray (real(kind=4) & restrict zz1)
>  {
>    integer(kind=8) ptrzz;
> -  integer(kind=8) _2;
> +  integer(kind=8) _3;
>  
>    <bb 2> :
> -  _2 = (integer(kind=8)) zz1_1(D);
> -  if (zz1_1(D) != 0)
> -    goto <bb 3>; [INV]
> -  else
> -    goto <bb 4>; [INV]
> -
> -  <bb 3> :
> +  _3 = (integer(kind=8)) zz1_1(D);
>    _gfortran_abort ();

I suspect there was a patch which special case references to say they cannot be
null in the middle-end.

Reply via email to