http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52864

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-12 
09:52:03 UTC ---
Regarding the original issue (comment 0): The patch has been submitted to
http://gcc.gnu.org/ml/fortran/2012-04/msg00058.html

 * * *

(In reply to comment #2)
> Here's a somewhat different example, but I think it exposes the same
> underlying bug.

Thanks for the bug report!

While the bug is language wise related, it is rather different in terms of the
compiler: It's not a regression and the bug is in a completely different file.

Untested draft patch:

--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -2807,3 +2823,6 @@ compare_parameter_intent (gfc_symbol *formal, gfc_expr
 {
-  if (actual->symtree->n.sym->attr.pointer && !formal->attr.pointer)
+  if (gfc_expr_attr (actual).pointer
+      && ((formal->ts.type == BT_CLASS && formal->attr.class_ok
+          && !CLASS_DATA (formal)->attr.class_pointer)
+         || (formal->ts.type != BT_CLASS && !formal->attr.pointer)))
     return 1;

Reply via email to