diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-11-13 11:13:57 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-11-13 12:13:57 +0100 |
commit | 46927ade0f5933c4eb22b049996fa15080b7f652 (patch) | |
tree | 83a041f06768458e390fa467c2bc8a32bd1bbf36 /libgfortran | |
parent | 0302955aeb7133bb3ff0a0e7673f0ca33152f036 (diff) |
PR fortran/92470 Fixes for CFI_address
libgfortran/
PR fortran/92470
* runtime/ISO_Fortran_binding.c (CFI_establish): Set lower_bound to 0
also for CFI_attribute_other.
gcc/testsuite/
PR fortran/92470
* gfortran.dg/ISO_Fortran_binding_1.c (establish_c): Add assert for
lower_bound == 0.
From-SVN: r278128
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/runtime/ISO_Fortran_binding.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 1abdd6a4f24..0727ade0104 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2019-11-13 Tobias Burnus <tobias@codesourcery.com> + + PR fortran/92470 + * runtime/ISO_Fortran_binding.c (CFI_establish): Set lower_bound to 0 + also for CFI_attribute_other. + 2019-11-12 Tobias Burnus <tobias@codesourcery.com> PR fortran/92470 diff --git a/libgfortran/runtime/ISO_Fortran_binding.c b/libgfortran/runtime/ISO_Fortran_binding.c index 7ae2a9351da..91d9ae46d3d 100644 --- a/libgfortran/runtime/ISO_Fortran_binding.c +++ b/libgfortran/runtime/ISO_Fortran_binding.c @@ -387,13 +387,7 @@ int CFI_establish (CFI_cdesc_t *dv, void *base_addr, CFI_attribute_t attribute, for (int i = 0; i < rank; i++) { - /* If the C Descriptor is for a pointer then the lower bounds of every - * dimension are set to zero. */ - if (attribute == CFI_attribute_pointer) - dv->dim[i].lower_bound = 0; - else - dv->dim[i].lower_bound = 1; - + dv->dim[i].lower_bound = 0; dv->dim[i].extent = extents[i]; if (i == 0) dv->dim[i].sm = dv->elem_len; |