This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |janus at gcc dot gnu.org

--- Comment #8 from janus at gcc dot gnu.org ---
(In reply to janus from comment #7)
> The following patch makes the error go away, but (as expected) causes a
> failure of proc_ptr_result_8.f90 in the testsuite ...

... which can be made up for with this hunk:


Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c    (revision 201520)
+++ gcc/fortran/interface.c    (working copy)
@@ -1416,7 +1416,8 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol
       if (s1->attr.function && s2->attr.function)
     {
       /* If both are functions, check result characteristics.  */
-      if (!check_result_characteristics (s1, s2, errmsg, err_len))
+      if (!check_result_characteristics (s1, s2, errmsg, err_len)
+          || !check_result_characteristics (s2, s1, errmsg, err_len))
         return 0;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]