This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix IMPLICIT CHARACTER handling (PR fortran/46884)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Fri, 10 Dec 2010 13:14:04 -0800
- Subject: Re: [PATCH] Fix IMPLICIT CHARACTER handling (PR fortran/46884)
- References: <20101210194523.GR29412@tyan-ft48-01.lab.bos.redhat.com>
On Fri, Dec 10, 2010 at 08:45:23PM +0100, Jakub Jelinek wrote:
>
> On the attached testcase f951 ICEs under valgrind (and on a larger
> testcase can ICE even without it), because a charlen is freed, eventhough
> it is actually referenced.
>
> The problem is with IMPLICIT charlen, gfc_new_charlen with non-NULL old_cl
> generates a copy of a charlen, which is then attached to an implicitly
> typed symbol, but if reject_statement is called afterwards, the charlen
> copy is freed, eventhough a pointer to it remains in the data structures.
>
> Fixed by making sure we never free in reject_statements gfc_new_charlen
> created structures if old_cl was non-NULL.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
OK.
--
Steve