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] Fix IMPLICIT CHARACTER handling (PR fortran/46884)


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


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