With many local variables with cleanups needed, we
get a huge chain of eh_region_d; and in some cases inside the
GC, the stack can overflow. This fixes the issue by
using chain_next on eh_region_d. In a similar way
r14-2270-gd0a333612bfb7f was done for eh_landing_pad_d.
Pushed as obvious after bootstrap/test on x86_64-linux-gnu.
PR middle-end/127602
gcc/ChangeLog:
* except.h (struct eh_region_d): Add chain_next GTY.
Signed-off-by: Andrea Pinski <[email protected]>
---
gcc/except.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/except.h b/gcc/except.h
index e0cb9431166..1988d9f4ad7 100644
--- a/gcc/except.h
+++ b/gcc/except.h
@@ -115,7 +115,7 @@ struct GTY(()) eh_catch_d
/* Describes one exception region. */
-struct GTY(()) eh_region_d
+struct GTY((chain_next("%h.next_peer"))) eh_region_d
{
/* The immediately surrounding region. */
struct eh_region_d *outer;
--
2.43.0