[Bug c++/70847] [6/7 Regression] exponential time in cp_fold for chained virtual function calls
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 6 19:49:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70847
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Jun 6 19:48:22 2016
New Revision: 237151
URL: https://gcc.gnu.org/viewcvs?rev=237151&root=gcc&view=rev
Log:
PR c++/70847
PR c++/71330
PR c++/71393
* cp-gimplify.c (cp_fold_r): Set *walk_subtrees = 0 and return NULL
right after cp_fold call if cp_fold has returned the same stmt
already in some earlier cp_fold_r call.
(cp_fold_function): Add pset automatic variable, pass its address
to cp_walk_tree.
* g++.dg/opt/pr70847.C: New test.
* g++.dg/ubsan/pr70847.C: New test.
* g++.dg/ubsan/pr71393.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/opt/pr70847.C
trunk/gcc/testsuite/g++.dg/ubsan/pr70847.C
trunk/gcc/testsuite/g++.dg/ubsan/pr71393.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list