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] PR17741 - ICE in gfc_free_namespace, at fortran/symbol.c:2208


On Thursday 11 May 2006 21:14, François-Xavier Coudert wrote:
> >     PR fortran/17741
> >     * symbol.c(gfc_free_namespace):  If the number of refs is
> >     zero or less, emit an error and return instead of ICEing.
>
> Your patch doesn't apply cleanly. When patching myself, I get
>
> $ gfortran pr17741.f90
>  In file pr17741.f90:4
>
> end subroutine
>   1
> Error: Expecting END FUNCTION statement at (1)
> Error: Unexpected end of file in 'pr17741.f90'
> Error: namespace bar has 0 references on being freed
>
>
> This isn't user-friendly at all.

I agree. The compiler has got itself confused and tried to do something that 
should never happen. An ICE is the correct response.

The fact that this occurs when the user code is illegal is irrelevant. We've 
already issued a separate error about that.

The proper solution is to fix whatever causes the double free.

Paul


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