This is the mail archive of the gcc-patches@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]

Re: [Patch, Fortran, OOP] PR 56261: seg fault call procedure pointer on polymorphic array


> [Btw, I also thought about doing a full "gfc_compare_interfaces" in
> "resolve_global_procedure", but that would probably be too strict.]

Comment to self: It's certainly more strict, but I think this is a
good thing. I just tried it and in fact it catches a number of cases
in the testsuite, which previously went unnoticed.

In the new patch in the attachment, I have already corrected most of
the testsuite failures (some were accepts-invalid cases, others just
due to the changed wording).

There are two nontrivial cases, where the behavior has changed (from
"explicit interface required" to "interface mismatch"):
 * auto_char_len_4
 * whole_file_7
The first has already been discussed upthread.

The remaining failures are:

FAIL: gfortran.dg/import2.f90  -O  (test for excess errors)
FAIL: gfortran.dg/import6.f90  -O  (test for excess errors)
FAIL: gfortran.dg/global_references_1.f90  -O   (test for errors, line 35)
FAIL: gfortran.dg/global_references_1.f90  -O  (test for excess errors)
FAIL: gfortran.dg/function_types_3.f90  -O  (test for excess errors)

For the first two, I'm not sure if they are actually valid (if yes,
one should check why they are rejected).

The last two just give extra errors on code lines that had already
been rejected with an error. Not sure if we can get rid of these
double diagnostics, or if one should simply adjust the dg-errors.

I definitely think this version of the patch is superior over the last
one. Any comments?

Cheers,
Janus

Attachment: pr56261_v6.diff
Description: Binary data


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