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

Subversion Repositories openrisc

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

Go to most recent revision | 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
! Take the pack intrinsic through its paces, with all types that are
4
! normally accessible.
5
program main
6
  implicit none
7
  integer,parameter :: k = selected_int_kind (range (0_8) + 1)
8
  integer :: i
9
  integer(kind=k), dimension(3,3) :: ik
10
  integer(kind=k), dimension(9) :: vik
11
  integer(kind=k), dimension(9) :: rik
12
 
13
  vik = (/(i+10,i=1,9)/)
14
  ik = reshape((/1_k, -1_k, 2_k, -2_k, 3_k, -3_k, 4_k, -4_k, 5_k/), shape(ik))
15
  rik = pack(ik,ik>0,vik)
16
  if (any(rik /= (/1_k, 2_k, 3_k, 4_k, 5_k, 16_k, 17_k, 18_k, 19_k/))) &
17
       & call abort
18
 
19
 
20
end program main

powered by: WebSVN 2.1.0

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