[patch, fortran] PR36355: fix argument type checking for matmul

Daniel Franke franke.daniel@gmail.com
Wed May 28 15:31:00 GMT 2008


2008/5/28, Tobias Burnus <burnus@net-b.de>:
> a) a=[logical/numeric], b = invalid(e.g. character)
> b) a = invalid(e.g. character), b=[logical/numeric]
> c) a=logical, b = numerical
> d) a=numerical, b = logical.
>
> Test program, which should be rejected:
>
>   integer :: a(4,4)
>   logical :: b(4,4)
>   print *, matmul(a,b)
>   end

matmul.f90:12.19:

   print *, matmul(a,b)
                  1
Error: Argument types of 'matmul' intrinsic at (1) must match
(INTEGER(4)/LOGICAL(4))

Updated patch attached, not regression tested yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr36355.patch
Type: text/x-diff
Size: 1342 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080528/4f0d5656/attachment.bin>


More information about the Fortran mailing list