From 980f185ce3ba6d532530ce0f23bfb6e30320fd8a Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Sat, 5 Oct 2019 08:17:55 +0000 Subject: re PR fortran/91926 (assumed rank optional) 2019-10-05 Paul Thomas PR fortran/91926 * trans-expr.c (gfc_conv_gfc_desc_to_cfi_desc): Correct the assignment of the attribute field to account correctly for an assumed shape dummy. Assign separately to the gfc and cfi descriptors since the atribute can be different. Add btanch to correctly handle missing optional dummies. 2019-10-05 Paul Thomas PR fortran/91926 * gfortran.dg/ISO_Fortran_binding_13.f90 : New test. * gfortran.dg/ISO_Fortran_binding_13.c : Additional source. * gfortran.dg/ISO_Fortran_binding_14.f90 : New test. 2019-10-05 Paul Thomas PR fortran/91926 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Do not modify the bounds and offset for CFI_other. From-SVN: r276624 --- libgfortran/runtime/ISO_Fortran_binding.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgfortran/runtime') diff --git a/libgfortran/runtime/ISO_Fortran_binding.c b/libgfortran/runtime/ISO_Fortran_binding.c index 695ef57..8cfcc98 100644 --- a/libgfortran/runtime/ISO_Fortran_binding.c +++ b/libgfortran/runtime/ISO_Fortran_binding.c @@ -63,7 +63,8 @@ cfi_desc_to_gfc_desc (gfc_array_void *d, CFI_cdesc_t **s_ptr) d->dtype.version = s->version; GFC_DESCRIPTOR_RANK (d) = (signed char)s->rank; - d->dtype.attribute = (signed short)s->attribute; + if (d->dtype.attribute == CFI_attribute_other) + return; if (s->rank) { -- cgit v1.1