https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88007

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is because parse_optimize_options has:
              r = q = (char *) ggc_alloc_atomic (len2 + 3);
and constructs in there the whole option, like "-falign-functions=16" , and
then options processing comes and points arg into that string (so "16").
As gcc_options is marked GTY, the const char * fields in there thus need to be
either not GC memory at all, or they need to point at the start of a GC chunk,
or into the middle of STRING_CST, everything else is disallowed.

So, either we need to pass down to the option processing info that the options
are GC allocated and if we'd have arg pointing into the middle of such a
string, ggc_strdup it, or maybe c-common.c should use XOBNEWVEC (&opts_obstack,
char, len2 + 3); instead of (char *) ggc_alloc_atomic (len2 + 3) ?

Reply via email to