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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [intrinsic_spread_3.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-require-effective-target fortran_large_int }
3
 
4
program foo
5
   implicit none
6
   integer,parameter :: k = selected_int_kind (range (0_8) + 1)
7
 
8
   integer(kind=k), dimension(10) :: i_k
9
   integer(kind=k), dimension (2, 3) :: a_k
10
   integer(kind=k), dimension (2, 2, 3) :: b_k
11
   character (len=200) line1, line2, line3
12
 
13
   a_k = reshape ((/1_k, 2_k, 3_k, 4_k, 5_k, 6_k/), (/2, 3/))
14
   b_k = spread (a_k, 1, 2)
15
   if (any (b_k .ne. reshape ((/1_k, 1_k, 2_k, 2_k, 3_k, 3_k, 4_k, 4_k, 5_k, 5_k, 6_k, 6_k/), &
16
                            (/2, 2, 3/)))) &
17
      call abort
18
   line1 = ' '
19
   write(line1, 9000) b_k
20
   line2 = ' '
21
   write(line2, 9000) spread (a_k, 1, 2)
22
   if (line1 /= line2) call abort
23
   line3 = ' '
24
   write(line3, 9000) spread (a_k, 1, 2) + 0_k
25
   if (line1 /= line3) call abort
26
   i_k = spread(1_k,1,10)
27
   if (any(i_k /= 1_k)) call abort
28
 
29
9000 format(12I3)
30
 
31
end program

powered by: WebSVN 2.1.0

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