[Patch] Fix compilation time explosion in contains_label_p
Eric Botcazou
ebotcazou@adacore.com
Sun Jun 28 12:47:00 GMT 2009
Hi,
the attached testcase (with -gnato) triggers a compilation time explosion in
contains_label_p because the tree passed to it contains many shared nodes,
which are then walked multiple time.
Tested on i586-suse-linux, OK for mainline?
2009-06-28 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c: Include pointer-set.h.
(contains_label_p): Do not walk trees multiple time.
* Makefile.in (fold-const.o): Add dependency on pointer-set.h.
2009-06-28 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/overflow_sum2.adb: New test
* gnat.dg/namet.ads: New helper.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-diff
Size: 1558 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090628/4d29fbe2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namet.ads
Type: text/x-adasrc
Size: 196 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090628/4d29fbe2/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overflow_sum2.adb
Type: text/x-adasrc
Size: 902 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090628/4d29fbe2/attachment-0002.bin>
More information about the Gcc-patches
mailing list