summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gfortran.dg/graphite/pr45758.f90
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gfortran.dg/graphite/pr45758.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr45758.f9041
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr45758.f90 b/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
new file mode 100644
index 000000000..b0e0a3d2c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
@@ -0,0 +1,41 @@
+! { dg-options "-O3 -floop-block" }
+
+MODULE util
+ INTEGER, PARAMETER :: int_4=4
+ INTERFACE sort
+ MODULE PROCEDURE sort_int_4v
+ END INTERFACE
+CONTAINS
+ SUBROUTINE sort_int_4v ( arr, n, index )
+ INTEGER(KIND=int_4), INTENT(INOUT) :: arr(1:n)
+ INTEGER, INTENT(OUT) :: INDEX(1:n)
+ DO i = 1, n
+ INDEX(i) = i
+ END DO
+1 IF (ir-l<m) THEN
+ DO j = l + 1, ir
+ DO i = j - 1, 1, -1
+ IF (arr(i)<=a) GO TO 2
+ arr(i+1) = arr(i)
+ INDEX(i+1) = INDEX(i)
+ END DO
+2 arr(i+1) = a
+ END DO
+ END IF
+ END SUBROUTINE sort_int_4v
+ SUBROUTINE create_destination_list(list)
+ INTEGER, DIMENSION(:, :, :), POINTER :: list
+ INTEGER :: icpu, ncpu, stat, ultimate_max
+ INTEGER, ALLOCATABLE, DIMENSION(:) :: index, sublist
+ ultimate_max=7
+ ALLOCATE(INDEX(ultimate_max),STAT=stat)
+ CALL t(stat==0)
+ ALLOCATE(sublist(ultimate_max),STAT=stat)
+ DO icpu=0,ncpu-1
+ CALL sort(sublist,ultimate_max,index)
+ list(1,:,icpu)=sublist
+ list(2,:,icpu)=0
+ ENDDO
+ END SUBROUTINE create_destination_list
+END MODULE
+