summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/class_array_3.f03
diff options
context:
space:
mode:
authorpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-16 17:48:26 +0000
committerpault <pault@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-16 17:48:26 +0000
commit44e6e526da5c014aae364044d77b30766d29d8a3 (patch)
treebf7f629b5cbc145d54768a410a2bd8fec3382995 /gcc/testsuite/gfortran.dg/class_array_3.f03
parent4470b8f689d4ca7b799fb223653b62ffcf521c33 (diff)
downloadgcc-44e6e526da5c014aae364044d77b30766d29d8a3.tar.gz
2012-01-16 Paul Thomas <pault@gcc.gnu.org>
* trans-array.c (gfc_trans_create_temp_array): In the case of a class array temporary, detect a null 'eltype' on entry and use 'initial' to provde the class reference and so, through the vtable, the element size for the dynamic type. * trans-stmt.c (gfc_conv_elemental_dependencies): For class expressions, set 'eltype' to null and pass the values via the 'initial' expression. 2012-01-16 Paul Thomas <pault@gcc.gnu.org> * gfortran.dg/class_array_3.f03: Remove the explicit loop in subroutine 'qsort' and use index array to assign the result. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_array_3.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_3.f035
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_array_3.f03 b/gcc/testsuite/gfortran.dg/class_array_3.f03
index 874fecc3575..8972161fbb3 100644
--- a/gcc/testsuite/gfortran.dg/class_array_3.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_3.f03
@@ -45,10 +45,7 @@ contains
allocate (tmp(size (a, 1)), source = a)
index_array = [(i, i = 1, size (a, 1))]
call internal_qsort (tmp, index_array) ! Do not move class elements around until end
- do i = 1, size (a, 1) ! Since they can be of arbitrary size.
- a(i) = tmp(index_array(i)) ! Vector index array would be neater
- end do
-! a = tmp(index_array) ! Like this - TODO: fixme
+ a = tmp(index_array)
end subroutine qsort
recursive subroutine internal_qsort (x, iarray)