This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] Inline DOT_PRODUCT


Just for the record, before the Paul's patch the following program:

! { dg-do run }
! Checks the LOGICAL version of dot_product
!
! Contributed by Paul Thomas  <pault@gcc.gnu.org>
!
   logical(1) :: l1(4) = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./)
   logical(1) :: l2(4) = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./)
   if (dot_product (l1, l2)) call abort ()
   l2 = .TRUE.
   if (.not.dot_product (l1, l2)) call abort ()
end

compiles, but gives:

[karma] bug/timing% a.out
../../../libgfortran/generated/dotprod_l4.c:67: failed assertion `GFC_DESCRIPTOR_SIZE (a) == 8'
Abort

The same occurs for logical(2) but not logical(8).

Dominique


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]