tree-optimization/98499 - fix modref analysis on RVO statements
authorSergei Trofimovich <siarheit@google.com>
Mon, 11 Jan 2021 18:05:57 +0000 (18:05 +0000)
committerSergei Trofimovich <siarheit@google.com>
Mon, 1 Feb 2021 18:13:42 +0000 (18:13 +0000)
commit11056ab7687f7156846e93557c9171b77713bd7e
tree5f6dd9686df74d079fbd0f61f6fb795a4e9d7122
parent8bfdf51d8595537937f990947a7a36d3a63dca5f
tree-optimization/98499 - fix modref analysis on RVO statements

Before the change RVO gimple statements were treated as local
stores by modres analysis. But in practice RVO escapes target.

2021-02-01  Sergei Trofimovich  <siarheit@google.com>

gcc/ChangeLog:

PR tree-optimization/98499
* ipa-modref.c (analyze_ssa_name_flags): treat RVO
conservatively and assume all possible side-effects.

gcc/testsuite/ChangeLog:

PR tree-optimization/98499
* g++.dg/pr98499.C: new test.
gcc/ipa-modref.c
gcc/testsuite/g++.dg/pr98499.C [new file with mode: 0644]