aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2015-02-22 19:38:53 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2015-02-22 19:38:53 +0000
commit62c4c81aec34c3874fd55ecff937c969658dd75d (patch)
tree6849f84a99ce0ca6a47504ff2f468d039f674569 /gcc/fortran
parent201f1cce71bf59f8b36a73070eda02ced8db3d7e (diff)
downloadgcc-62c4c81aec34c3874fd55ecff937c969658dd75d.zip
gcc-62c4c81aec34c3874fd55ecff937c969658dd75d.tar.gz
gcc-62c4c81aec34c3874fd55ecff937c969658dd75d.tar.bz2
re PR fortran/64980 (ICE in trans-expr.c)
2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de> PR fortran/64980 PR fortran/61960 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping for component references to class objects. (gfc_conv_procedure_call): Compare the class by name. testsuite: 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de> PR fortran/64980 PR fortran/61960 * gfortran.dg/pr61960.f90: New. * gfortran.dg/pr64230.f90: New. * gfortran.dg/pr64980.f03: New. From-SVN: r220899
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog8
-rw-r--r--gcc/fortran/trans-expr.c10
2 files changed, 10 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b6dd480..d80c59b 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR fortran/64980
+ PR fortran/61960
+ * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
+ for component references to class objects.
+ (gfc_conv_procedure_call): Compare the class by name.
+
2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/64506
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index d6f84ff..db04b30 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -3783,10 +3783,6 @@ gfc_apply_interface_mapping_to_expr (gfc_interface_mapping * mapping,
expr->symtree = sym->new_sym;
else if (sym->expr)
gfc_replace_expr (expr, gfc_copy_expr (sym->expr));
- /* Replace base type for polymorphic arguments. */
- if (expr->ref && expr->ref->type == REF_COMPONENT
- && sym->expr && sym->expr->ts.type == BT_CLASS)
- expr->ref->u.c.sym = sym->expr->ts.u.derived;
}
/* ...and to subexpressions in expr->value. */
@@ -4541,10 +4537,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
&& fsym->ts.type == BT_CLASS
&& !CLASS_DATA (fsym)->as
&& !CLASS_DATA (e)->as
- && (CLASS_DATA (fsym)->attr.class_pointer
- != CLASS_DATA (e)->attr.class_pointer
- || CLASS_DATA (fsym)->attr.allocatable
- != CLASS_DATA (e)->attr.allocatable))
+ && strcmp (fsym->ts.u.derived->name,
+ e->ts.u.derived->name))
{
type = gfc_typenode_for_spec (&fsym->ts);
var = gfc_create_var (type, fsym->name);