diff mbox series

[fortran] Matmul and dot_product for unsigned

Message ID ff26e396-ff15-481f-a6d8-9587e3c7fce9@netcologne.de
State New
Headers show
Series [fortran] Matmul and dot_product for unsigned | expand

Commit Message

Thomas Koenig Sept. 26, 2024, 7:57 p.m. UTC
[I just saw I hit the wrong reply button on this]

Hi Andre,

> thanks for your answers. I am ok with the patch.

I have committed all four patches.

Thanks a lot for the reviews!

Now for the remaining intrinsics (FINDLOC, MAXLOC,
MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing).

And after that, C interop, one of the main reasons this
was requested.

I have also committed, right now, a fix for the failure of
unsigned_25.f90 on 32-bit systems as obvious.

Best regards

	Thomas

Author: Thomas Koenig <tkoenig@gcc.gnu.org>
Date:   Wed Sep 25 18:51:48 2024 +0200

     Fix testsuite failure on 32-bit targets.

     gcc/testsuite/ChangeLog:

             * gfortran.dg/unsigned_25.f90: Change KIND=16 to KIND=8.

Comments

Mikael Morin Sept. 27, 2024, 9:30 a.m. UTC | #1
Le 26/09/2024 à 21:57, Thomas Koenig a écrit :

> Now for the remaining intrinsics (FINDLOC, MAXLOC,
> MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing).
> 
I have one patch series touching (inline) MINLOC and MAXLOC to post in 
the coming days.  Could you please keep away from them for one more week 
or two?
Thomas Koenig Sept. 27, 2024, 3:08 p.m. UTC | #2
Hi Mikael,

>> Now for the remaining intrinsics (FINDLOC, MAXLOC,
>> MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing).
>>
> I have one patch series touching (inline) MINLOC and MAXLOC to post in 
> the coming days.  Could you please keep away from them for one more week 
> or two?

Looking at the previous patches, this will touch only check.cc,
iresolve.cc and simplify.cc (plus the library files).

Will your patches touch those areas?  If not, I think there should
be no conflict.

Best regards

	Thomas
Mikael Morin Sept. 27, 2024, 7:45 p.m. UTC | #3
Le 27/09/2024 à 17:08, Thomas Koenig a écrit :
> Hi Mikael,
> 
>>> Now for the remaining intrinsics (FINDLOC, MAXLOC,
>>> MINLOC, MAXVAL, MINVAL, CSHIFT and EOSHIFT still missing).
>>>
>> I have one patch series touching (inline) MINLOC and MAXLOC to post in 
>> the coming days.  Could you please keep away from them for one more 
>> week or two?
> 
> Looking at the previous patches, this will touch only check.cc,
> iresolve.cc and simplify.cc (plus the library files).
> 
> Will your patches touch those areas?  If not, I think there should
> be no conflict.
> 
Perfect, they don't touch them.
diff mbox series

Patch

diff --git a/gcc/testsuite/gfortran.dg/unsigned_25.f90 
b/gcc/testsuite/gfortran.dg/unsigned_25.f90
index f6144988d82..0cd86b093bb 100644
--- a/gcc/testsuite/gfortran.dg/unsigned_25.f90
+++ b/gcc/testsuite/gfortran.dg/unsigned_25.f90
@@ -27,9 +27,9 @@  contains
           5u, uint(-6), 7u, uint(-8), 9u],[3,3])
      unsigned, parameter :: v(3,3) = 1u - u
      unsigned, parameter :: w(3,3) = matmul(u,v)
-    integer(kind=16), dimension(3,3), parameter :: &
-         i = int(u,16), j = int(v,16)
-    integer(kind=16), dimension(3,3) :: k = matmul(i,j)
+    integer(kind=8), dimension(3,3), parameter :: &
+         i = int(u,8), j = int(v,8)
+    integer(kind=8), dimension(3,3) :: k = matmul(i,j)
      if (any(uint(k) /= w)) error stop 2
    end subroutine test2
  end program memain