OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [intrinsic_transpose.f90] - Blame information for rev 760

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 695 jeremybenn
! Program to test the transpose intrinsic
2
program intrinsic_transpose
3
   integer, dimension (3, 3) :: a, b
4
   complex(kind=8), dimension (2, 2) :: c, d
5
   complex(kind=4), dimension (2, 2) :: e
6
 
7
   a = 0
8
   b = reshape ((/1, 2, 3, 4, 5, 6, 7, 8, 9/), (/3, 3/))
9
   a = transpose (b)
10
   if (any (a .ne. reshape ((/1, 4, 7, 2, 5, 8, 3, 6, 9/), (/3, 3/)))) &
11
      call abort
12
   c = (0.0, 0.0)
13
   d = reshape ((/(1d0,2d0), (3d0, 4d0), (5d0, 6d0), (7d0, 8d0)/), (/2, 2/))
14
   c = transpose (d);
15
   if (any (c .ne. reshape ((/(1d0, 2d0), (5d0, 6d0), &
16
                              (3d0, 4d0), (7d0, 8d0)/), (/2, 2/)))) &
17
    call abort ();
18
 
19
   e = reshape ((/(1.0,2.0), (3.0, 4.0), (5.0, 6.0), (7.0, 8.0)/), (/2, 2/))
20
   e = transpose (e);
21
   if (any (e .ne. reshape ((/(1.0, 2.0), (5.0, 6.0), &
22
                              (3.0, 4.0), (7.0, 8.0)/), (/2, 2/)))) &
23
    call abort ();
24
end program

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.