===================================================================
@@ -1,5 +1,10 @@
2013-03-31 Tobias Burnus <burnus@net-b.de>
+ * trans-intrinsic.c (conv_isocbinding_subroutine): Fix
+ merge-resolution bug.
+
+2013-03-31 Tobias Burnus <burnus@net-b.de>
+
* trans-array.c (VERSION_FIELD): New define.
(ELEM_LEN_FIELD): Renamed from SIZE_FIELD, reordered the fields.
(gfc_build_null_descriptor): Also set version field (to 1).
===================================================================
@@ -6467,6 +6467,10 @@ conv_isocbinding_subroutine (gfc_code *code)
tmp = fold_build2_loc (input_location, TRUNC_DIV_EXPR,
gfc_array_index_type, sm,
fold_convert (TREE_TYPE (sm), tmp));
+ gfc_add_modify (&body, offset,
+ fold_build2_loc (input_location, PLUS_EXPR,
+ gfc_array_index_type, offset, tmp));
+
/* Update stride multiplier. */
gfc_add_modify (&body, sm,
fold_build2_loc (input_location, MULT_EXPR,
===================================================================
@@ -1,3 +1,7 @@
+2013-03-31 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/c_f_pointer_tests.f90: Move to trunk version.
+
2012-07-20 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/c_f_pointer_tests_3.f90: Update scan-tree-dump
===================================================================
@@ -53,22 +53,16 @@ module c_f_pointer_tests
shapeArray(1) = arrayLen
call c_f_pointer(derivedArray, myF90DerivedArray, shapeArray)
-print *, myF90DerivedArray(1)
-!end
! upper bound of each dim is arrayLen2
-! shapeArray2(1) = dim1
-! shapeArray2(2) = dim2
-! call c_f_pointer(derived2DArray, derivedArray2D, shapeArray2)
-!print *, derivedArray2D(dim1, dim2)%cInt
-!print *, derivedArray2D(dim1, dim2)%cDouble
-!print *, derivedArray2D(dim1, dim2)%cFloat
-!print *, derivedArray2D(dim1, dim2)%cShort
+ shapeArray2(1) = dim1
+ shapeArray2(2) = dim2
+ call c_f_pointer(derived2DArray, derivedArray2D, shapeArray2)
! make sure the last element is ok
-! if((derivedArray2D(dim1, dim2)%cInt .ne. 4) .or. &
-! (derivedArray2D(dim1, dim2)%cDouble .ne. 4.0d0) .or. &
-! (derivedArray2D(dim1, dim2)%cFloat .ne. 4.0) .or. &
-! (derivedArray2D(dim1, dim2)%cShort .ne. 4)) then
-! call abort()
-! endif
+ if((derivedArray2D(dim1, dim2)%cInt .ne. 4) .or. &
+ (derivedArray2D(dim1, dim2)%cDouble .ne. 4.0d0) .or. &
+ (derivedArray2D(dim1, dim2)%cFloat .ne. 4.0) .or. &
+ (derivedArray2D(dim1, dim2)%cShort .ne. 4)) then
+ call abort()
+ endif
end subroutine testDerivedPtrs
end module c_f_pointer_tests