[Bug fortran/53732] [4.7/4.8 Regression] "mismatching comparison operand types" on compile

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Thu Jun 21 15:08:00 GMT 2012


--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-06-21 15:07:58 UTC ---
> [*] Carefully crafted with love and patience, using the ancestral methods and
> tools available to the windows users (i.e. Notepad.exe).
> In other words, the patch may not apply cleanly.

Well, it did!-) The patch even fixed the PR (no regression with -m32, further
testing in progress).

I wonder if 

-  if (!skip_nested)
+  if (!subscript && !skip_nested)

would not be enough?

Note that there is a temporary that is not needed if I am not mistaken:

[macbook] f90/bug% gfc pr53732.f90 -Warray-temporaries

arr(1, :, :, :) = sum(arr, dim=1, mask=(arr(:,:,:,:) > 0d0))
Warning: Creating array temporary at (1)

a(k)=sum(a) can be scalarized as

do i=lb,ub
if (i /= k) a(k) = a(k)+a(i)
end do

Thanks for the quick patch.

More information about the Gcc-bugs mailing list