diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2014-04-13 11:58:55 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2014-04-13 11:58:55 +0000 |
commit | 1cf43a1dbdb4f61d2f9bbfffb2fdc6130aa07781 (patch) | |
tree | a0e9223d3fa93775c9210bdc4aade00d42633cb2 /gcc/fortran/trans.h | |
parent | ef3a248fbb9c61d510cdcee3de0476994ae32790 (diff) | |
download | gcc-1cf43a1dbdb4f61d2f9bbfffb2fdc6130aa07781.zip gcc-1cf43a1dbdb4f61d2f9bbfffb2fdc6130aa07781.tar.gz gcc-1cf43a1dbdb4f61d2f9bbfffb2fdc6130aa07781.tar.bz2 |
re PR fortran/58085 (Wrong indexing of an array in ASSOCIATE)
2014-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/58085
PR fortran/60717
* trans.h: Add 'use_offset' bitfield to gfc_se.
* trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset'
as a trigger to unconditionally recalculate the offset for
array slices and constant arrays.
trans-expr.c (gfc_conv_intrinsic_to_class): Use it.
trans-stmt.c (trans_associate_var): Ditto.
(gfc_conv_procedure_call): Ditto.
2014-04-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/60717
* gfortran.dg/unlimited_polymorphic_17.f90: New test.
PR fortran/58085
* gfortran.dg/associate_15.f90: New test.
From-SVN: r209347
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 4ae68c6..f8d29ec 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -87,6 +87,10 @@ typedef struct gfc_se args alias. */ unsigned force_tmp:1; + /* Unconditionally calculate offset for array segments and constant + arrays in gfc_conv_expr_descriptor. */ + unsigned use_offset:1; + unsigned want_coarray:1; /* Scalarization parameters. */ @@ -99,7 +103,7 @@ gfc_se; /* Denotes different types of coarray. Please keep in sync with libgfortran/caf/libcaf.h. */ -typedef enum +typedef enum { GFC_CAF_COARRAY_STATIC, GFC_CAF_COARRAY_ALLOC, @@ -178,7 +182,7 @@ typedef enum /* An intrinsic function call. Many intrinsic functions which map directly to library calls are created as GFC_SS_FUNCTION nodes. */ GFC_SS_INTRINSIC, - + /* A component of a derived type. */ GFC_SS_COMPONENT } |