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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Jason Merrill from comment #6)
> > It is caused by 
> > commit 88bbd5a94e06eb42a5ed84a3ff6da498bea229e9 (HEAD, refs/bisect/bad)
> 
> r274671, or r10-2655-g04e1749c557a5df14f8528efa451bb0e93afea80 in the new
> git.
> 
> The problem is that
> 
>  TREE_READONLY (e) = true;
> 
> ends up setting the flag on the variable 'f' because its initialization is
> not actually constant.  Protecting that by checking one or both of
> *non_constant_p and TREE_CODE (e) should fix the issue.  What do you think,
> Marek?

Absolutely, blindly setting TREE_READONLY was definitely a mistake.  Patch
posted: <https://gcc.gnu.org/ml/gcc-patches/2020-02/msg01126.html>.  Thanks for
the suggestion.

Reply via email to