https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102560
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Aldy Hernandez <al...@gcc.gnu.org>: https://gcc.gnu.org/g:fa3ccf8bfe9940b439d6cc2c38ee8da134b0ff2d commit r12-4139-gfa3ccf8bfe9940b439d6cc2c38ee8da134b0ff2d Author: Aldy Hernandez <al...@redhat.com> Date: Sun Oct 3 19:42:10 2021 +0200 Remove static marker for range in alloca pass. The m_ranges[] field in int_range<N> are trees, so they live in GC space. Since invalid_range is static, it must be marked with GTY magic. However, calculating invalid_range is not particularly slow, or on a critical path, so we can just put it in local scope and recalculate every time. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/102560 * gimple-ssa-warn-alloca.c (alloca_call_type): Remove static marker for invalid_range. gcc/testsuite/ChangeLog: * g++.dg/Walloca2.C: New test.