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]

[PATCH] Fix tree-opt/21732 -ftree-dump-all-details going into an infinite loop


The problem here is that the debugging dumping function, dump_copy_of in tree-ssa-copy.c
could go into an infinite loop dumping the chain. This patch fixes it by creating a
bitmap so we can check to see if we visited the SSA_NAME already, I also added
a check for var since that is looks like the original intent in the first place.


OK? Tested by building a compiler with this patch and dumping the output for
tree-ssa-operands.i which has a couple of loops which can go for three long and
not loop though the var.


Thanks,
Andrew Pinski

ChangeLog:
	* tree-ssa-copy.c (dump_copy_of): Create a bitmap and don't visit a
	SSA_NAME twice and cause the loop to become finite.  Also test for var
	in the loop.

Attachment: temp.diff.txt
Description: Text document


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