------- Comment #5 from sfilippone at uniroma2 dot it  2008-10-04 10:29 -------
(In reply to comment #4)
> The problem is clearly that because of the error the type-bound procedure
> remains in a somewhat "dubious" state (its pass_arg_num is invalid) and this
> causes the ICE when resolving an actual call to it afterwards.  This is of
> course easy to fix.
> 
> But I wonder about what a subsequent call to the procedure should do, as the
> PASS could not be resolved...  This will then probably generate errors about
> actual/formal arglist mismatch for correct calls where only the name inside
> PASS(x) is wrong.  Is this ok?  The easiest would probably be to take
> PASS(invalid) as NOPASS or interpret it as PASS without argument name for that
> matter.
> 
> Another solution would be to simply ignore calls to such an erraneous 
> procedure
> in the resolver (and set them to EXEC_NOP for instance to avoid later 
> confusion
> of gfortran?) which would mean that there is no error checking at all for 
> them;
> but as this is not possible anyway, maybe that should be the way to go?
> 

Hmm. I see that in my previous comment #3 I said the wrong thing: the attached
sample code should be correct, once the name in the PASS argument is fixed. 
The reasoning behind #3 is that in my original code I have types derived from
base_foo_type, which means that for *those* types an argument mismatch must be
issued if I try to invoke makenull, until  the CLASS() declaration is
implemented, so that the makenull() body can be written in the proper way. 
So, I was still thinking of my code and not of the cut-down test case. 
Sorry for the confusion. 


-- 


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

Reply via email to