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] |
:ADDPATCH fortran: This is a fix for yet another regression of which I am the author. This time, in fixing PR28201, I broke the legitimate use of different modules to carry different specific procedures for a single generic interface. The fix turned out to be easy; it turns out that the problem in PR28201 was not the use association but, rather, that the search for specific procedures in the parent namespace was returning a null symbol and this was producing the ICE. Thus, the correct fix here was to refresh the symbol before the final ditch attempt to find a matching intrinsic. At the same time, the subsequent error message was changed to reflect what actually is happening in resolve_generic_s (and resolve_generic_f), thereby fixing PR20067. At the same time, I have restructured the search in resolve_generic_s and resolve_specific_s to give them the same form as their function counterparts: for (;;) { resolve as appropriate if MATCH_YES => return SUCCESS else if MATCH_ERROR => return FAILURE [generic:] if no parent namespace => break look for same name symbol in parent namespace if symbol is NULL => break [if !generic => goto generic] } This has no effect on the functionality but does improve maintainability. The additional testcase is a slightly extended version of that offered by the reporter. Regtested on Cygwin_NT/PIV: OK for trunk and 4.1? Paul 2006-08-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/28873 REGRESSION FIX PR fortran/20067 * resolve.c (resolve_generic_f): Make error message more comprehensible. (resolve_generic_s): Restructure search for specific procedures to be similar to resolve_generic_f and change to similar error message. Ensure that symbol reference is refreshed, in case the search produces a NULL. (resolve_specific_s): Restructure search, as above and as resolve_specific_f. Ensure that symbol reference is refreshed, in case the search produces a NULL. 2006-08-29 Paul Thomas <pault@gcc.gnu.org> PR fortran/20067 * gfortran.dg/used_types_5.f90: Change error message. PR fortran/28873 * gfortran.dg/used_types_6.f90: New test.
Attachment:
pr28873.diff
Description: pr28873.diff
Attachment:
commit0829.msg
Description: commit0829.msg
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |