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: [tree-ssa] Fix print_c_tree


On Thu, 2003-08-21 at 16:35, Zdenek Dvorak wrote:
> Hello,
> 
> print_c_tree shares the buffer of global_dc->printer; I suppose there is
> some reason for this hack, so just fix for the bug it causes --
> the buffer->stream is rewritten to the dump file, then the writes to
> global_dc->printer after this file is closed cause crash.
>
Where are you getting a crash?  Are you using print_c_tree after we're
in GIMPLE form?  The only place where we call it from is from the
genericizer.  I can see it crashing after global_dc->printer was
destroyed, but not before.

However, you're right in that reusing global_dc->printer is not a good
idea.  I was trying to avoid the overhead of always creating a
pretty_printer object, but I think it's best if we just do that in
print_c_tree.

> After installing it there is another ice, observable by compiling
> anything with -fdump-tree-all-all:
> 
I'm not getting a crash with -fdump-tree-all-all without your patch.


Could you change your patch to just create a pretty_printer object
instead of re-using global_dc->printer?


Thanks.  Diego.


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