tree-inline: Fix TREE_READONLY of parameter replacements
authorMartin Jambor <mjambor@suse.cz>
Wed, 23 Jun 2021 16:46:04 +0000 (18:46 +0200)
committerMartin Jambor <mjambor@suse.cz>
Wed, 23 Jun 2021 16:56:41 +0000 (18:56 +0200)
commit53330b7d6848209d658c02be76c36aa5475a88c9
treef96b56fd0d4dc325d56ec800aab5df549f184314
parent4c85ff754927c518ed97da5e0221eeea742c9aa7
tree-inline: Fix TREE_READONLY of parameter replacements

tree-inline leaves behind VAR_DECLs which are TREE_READONLY (because
they are copies of const parameters) but are written to because they
need to be initialized.  This patch resets the flag unconditionally so
that this does not happen.

There are other sources of variables which are incorrectly marked as
TREE_READOLY, but with this patch and a verifier catching them I can
at least compile the Ada run-time library.

gcc/ChangeLog:

2021-06-22  Richard Biener  <rguenther@suse.de>
    Martin Jambor  <mjambor@suse.cz>

* tree-inline.c (setup_one_parameter): Set TREE_READONLY of the
param replacement unconditionally.  Adjust comment.
gcc/tree-inline.c