On December 19, 2020 1:55:02 AM GMT+01:00, Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: >To keep tree expressions stored by the front end in attribute >access for nontrivial VLA bounds from getting corrupted during >Gimplification and to avoid breaking the preconditions verified >by the LTO streamer that no such trees exist in the IL, >the attached patch replaces those bounds with a string >representation of those expressions (as STRING_CST). It also >tweaks the pretty-printer to improve the formatting of the VLA >bounds and avoid inserting spurious spaces in some cases. > >The strings are only used by the front end to verify that >redeclarations of the same function match in the form and bounds >of their VLA arguments, and they're not needed in the middle end. >I considered removing them just before the front end finishes but >I couldn't find an efficient way to do that. Is there some data >structure that stores all function declarations in a translation >unit? If there is, then traversing it and removing the attribute >arguments might also be an option, either in addition to this >change or in lieu of it.
There is the free lang data pass in tree.c which walks all reachable tree nodes. >The patch was tested on x86_64-linux. > >Martin