Add testcase for PR45758.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 21:21:46 +0000 (21:21 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Sep 2010 21:21:46 +0000 (21:21 +0000)
2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>

PR middle-end/45758
* gfortran.dg/graphite/pr45758.f90: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164811 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.graphite
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/graphite/pr45758.f90 [new file with mode: 0644]

index a3293ac..af6d053 100644 (file)
@@ -1,5 +1,10 @@
 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
 
+       PR middle-end/45758
+       * gfortran.dg/graphite/pr45758.f90: New.
+
+2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
+
        * graphite-scop-detection.c (is_scop_p): Free bblist.
 
 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
index 9ab3d0b..1492bd6 100644 (file)
@@ -1,5 +1,10 @@
 2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
 
+       PR middle-end/45758
+       * gfortran.dg/graphite/pr45758.f90: New.
+
+2010-09-30  Sebastian Pop  <sebastian.pop@amd.com>
+
        PR middle-end/45230
        * gcc.dg/graphite/id-pr45230.c: New.
 
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr45758.f90 b/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
new file mode 100644 (file)
index 0000000..b0e0a3d
--- /dev/null
@@ -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
+