[Patch, fortran] PR24325 - ICE in gfc_get_function_type

Paul Thomas paulthomas2@wanadoo.fr
Fri Dec 29 13:17:00 GMT 2006


:ADDPATCH fortran:

I fell on this one quite accidentally - I still cannot quite believe 
that the fix is so simple :-)

In essence, if we arrive at resolve_function with the function not 
already resolved or with the symbol not having FL_UNKNOWN then, for sure 
and certain, we are going to produce the ICE in gfc_get_function_type.  
Initially, I had the test only detect FL_VARIABLE to throw the error.  
However, the opening block in resolve_symbol treats FL_UNKNOWN and 
results in them either being identified as variables or procedures.  
Thus I think that it is sufficient to test that the symbol is not a 
function and that testing for FL_UNKNOWN adds the belt and braces.

Regtested on Cygwin_NT/amd64 - OK for trunk and, in a week or so, 4.2?

Paul


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Change.Logs
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061229/1c35183c/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr24325.diff
Type: text/x-patch
Size: 1429 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20061229/1c35183c/attachment.bin>


More information about the Fortran mailing list