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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
!
3
! PR fortran/51250
4
! Wrong loop shape for SUM when arguments are library-allocated arrays.
5
!
6
! Original testcase provided by Harald Anlauf 
7
 
8
program gfcbug115
9
  implicit none
10
  integer :: n_obstype = 2
11
  integer :: nboxes = 1
12
  integer :: nprocs = 1
13
  integer :: nbox, j
14
  integer, allocatable :: nbx(:,:), pes(:)
15
 
16
  allocate (pes(nboxes))
17
  allocate (nbx(n_obstype,nboxes))
18
  nbx(:,:) = 1
19
  do j = 1, nboxes
20
     pes(j) = modulo (j-1, nprocs)
21
  end do
22
  if (any(nbx /= 1)) call abort
23
  do j = 0, nprocs-1
24
     if (.not. all(spread (pes==j,dim=1,ncopies=n_obstype))) call abort
25
     ! The two following tests used to fail
26
     if (any(shape(sum(nbx,dim=2,mask=spread (pes==j,dim=1,ncopies=n_obstype))) &
27
             /= (/ 2 /))) call abort
28
     if (any(sum (nbx,dim=2,mask=spread (pes==j,dim=1,ncopies=n_obstype)) &
29
             /= (/ 1, 1 /))) call abort
30
  end do
31
end program gfcbug115

powered by: WebSVN 2.1.0

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