This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 10 Aug 2013 12:57:52 +0000
- Subject: [Bug fortran/58099] [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking
- Auto-submitted: auto-generated
- References: <bug-58099-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58099
--- Comment #13 from janus at gcc dot gnu.org ---
(In reply to janus from comment #12)
> (In reply to Tobias Burnus from comment #10)
> > (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 ...
> > > - if (!gfc_compare_interfaces (s2, s1, name, 0, 1,
> > > - err, sizeof(err), NULL, NULL))
> > > - {
> > > - gfc_error ("Interface mismatch in procedure pointer assignment "
> > > - "at %L: %s", &rvalue->where, err);
> > > - return false;
> > > - }
> >
> >
> > Doesn't that remove too much? I had expected some special case for PURE,
> > while checking otherwise that the interface matches.
>
> No, I don't think it removes too much. It seems that the other parts of
> 'gfc_compare_interfaces' are already symmetrized appropriately, expect for
> the check on the result characteristics.
Here is another recent example where more symmetrization was done (this time in
check_dummy_characteristics):
http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=199375
In case we need more symmetrization, it should be done 'locally'. Duplicate
calls of gfc_compare_interfaces to symmetrize it are clearly wrong, as the case
with PURE shows.