From 90aeadcb5c1c498a6b4260a3e35063618541aff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Coudert?= Date: Wed, 27 Apr 2005 15:37:53 +0000 Subject: re PR fortran/21177 (wrong code with NULL()) PR fortran/21177 * interface.c (compare_parameter): Ignore type for EXPR_NULL only if type is BT_UNKNOWN. * gfortran.dg/pr21177.f90: New test From-SVN: r98837 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/interface.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index bf87e6a..822dcd0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-04-27 Francois-Xavier Coudert + + PR fortran/21177 + * interface.c (compare_parameter): Ignore type for EXPR_NULL + only if type is BT_UNKNOWN. + 2005-04-25 Paul Brook Steven G. Kargl diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 6cb8fc6..5b848bc 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -1096,7 +1096,7 @@ compare_parameter (gfc_symbol * formal, gfc_expr * actual, return compare_interfaces (formal, actual->symtree->n.sym, 0); } - if (actual->expr_type != EXPR_NULL + if ((actual->expr_type != EXPR_NULL || actual->ts.type != BT_UNKNOWN) && !gfc_compare_types (&formal->ts, &actual->ts)) return 0; -- cgit v1.1