aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2013-10-23 07:44:02 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2013-10-23 07:44:02 +0200
commit3d54e576483fe7a746ec6a9f5c4a42e743f27d13 (patch)
tree456f6737bb4c23b445cacffdd21e99c0afce7b2b /gcc/fortran/interface.c
parent55384dd76a3b213fcb6db67af3f630e5666dc59e (diff)
downloadgcc-3d54e576483fe7a746ec6a9f5c4a42e743f27d13.zip
gcc-3d54e576483fe7a746ec6a9f5c4a42e743f27d13.tar.gz
gcc-3d54e576483fe7a746ec6a9f5c4a42e743f27d13.tar.bz2
re PR fortran/58793 (Wrong value for _vtab for intrinsic types with CLASS(*): storage_size of class(*) gives wrong result)
2013-10-23 Tobias Burnus <burnus@net-b.de> PR fortran/58793 * interface.c (compare_parameter): Reject passing TYPE(*) to CLASS(*). 2013-10-23 Tobias Burnus <burnus@net-b.de> PR fortran/58793 * gfortran.dg/assumed_type_8.f90: New. From-SVN: r203945
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index b3ddf5f..0504c90 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1972,6 +1972,15 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
return 0;
}
+ if (actual->ts.type == BT_ASSUMED && formal->ts.type != BT_ASSUMED)
+ {
+ if (where)
+ gfc_error ("Assumed-type actual argument at %L requires that dummy "
+ "argument '%s' is of assumed type", &actual->where,
+ formal->name);
+ return 0;
+ }
+
/* F2008, 12.5.2.5; IR F08/0073. */
if (formal->ts.type == BT_CLASS && formal->attr.class_ok
&& actual->expr_type != EXPR_NULL