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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR 38135 - pad to RESHAPE didn't work correctly when SOURCE
3
! was an empty array.
4
 
5
program main
6
  implicit none
7
  integer, parameter :: N = 3
8
  integer(kind=1) :: A1(N,N)
9
  integer(kind=1) :: b1(n+1)
10
  integer(kind=4) :: A4(n,n)
11
  integer(kind=4) :: b4(n+1)
12
  character(len=9) :: line
13
 
14
  b1 = (/ 1, 2, 2, 2 /)
15
 
16
  A1(1:N,1:N)=reshape(A1(1:0,1),(/N,N/),b1)
17
  write(unit=line,fmt='(100i1)') A1
18
  if (line .ne. "122212221") call abort
19
 
20
  b4 = (/ 3, 4, 4, 4 /)
21
 
22
  a4 = reshape(a4(:0,1),(/n,n/),b4)
23
  write(unit=line,fmt='(100i1)') a4
24
  if (line .ne. "344434443") call abort
25
end program main

powered by: WebSVN 2.1.0

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