Commit 46927ade by Tobias Burnus Committed by Tobias Burnus

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
parent 0302955a
2019-11-13 Tobias Burnus <tobias@codesourcery.com>
PR fortran/92470
* gfortran.dg/ISO_Fortran_binding_1.c (establish_c): Add assert for
lower_bound == 0.
2019-11-13 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/mask_struct_store_3.c: Add
......
......@@ -109,6 +109,7 @@ int establish_c(CFI_cdesc_t * desc)
CFI_attribute_pointer,
CFI_type_struct,
sizeof(t), 1, extent);
assert (desc->dim[0].lower_bound == 0);
for (idx[0] = 0; idx[0] < extent[0]; idx[0]++)
{
res_addr = (t*)CFI_address (desc, idx);
......
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
......
......@@ -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].extent = extents[i];
if (i == 0)
dv->dim[i].sm = dv->elem_len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment