aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2019-02-21 18:01:41 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2019-02-21 18:01:41 +0000
commit9e6644c6fd3c9cf9f6a2fc6315052c953ab363cf (patch)
tree3de186d92dc63e6ad443f16ca94c716d68fc4a25 /gcc/fortran/simplify.c
parenteb74a883e812fc1a05fbf9cfa572043c4ee5af39 (diff)
downloadgcc-9e6644c6fd3c9cf9f6a2fc6315052c953ab363cf.zip
gcc-9e6644c6fd3c9cf9f6a2fc6315052c953ab363cf.tar.gz
gcc-9e6644c6fd3c9cf9f6a2fc6315052c953ab363cf.tar.bz2
re PR fortran/86119 (Intrinsic len has wrong type if used within select type for a class(*) string)
2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/86119 * class.c (gfc_get_len_component): Add argument k for kind. If the kind of the resulting expression is not equal to k, convert it. * gfortran.h (gfc_len_component): Adjust prototype. * simplify.c (gfc_simplify_len): Pass kind to gfc_get_len_component. 2019-02-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/86119 * gfortran.dg/warn_conversion_11.f90: New test. From-SVN: r269070
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 65059c8..fa6396b 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -4474,7 +4474,7 @@ gfc_simplify_len (gfc_expr *e, gfc_expr *kind)
/* The expression in assoc->target points to a ref to the _data component
of the unlimited polymorphic entity. To get the _len component the last
_data ref needs to be stripped and a ref to the _len component added. */
- return gfc_get_len_component (e->symtree->n.sym->assoc->target);
+ return gfc_get_len_component (e->symtree->n.sym->assoc->target, k);
else
return NULL;
}