aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/terminals.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2019-07-22 13:56:31 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-22 13:56:31 +0000
commit0af66bdce078d022e19dae1c83dfa06f7f622648 (patch)
tree8ecf8d102e9fc5189e3062f60afbb9a751826811 /gcc/ada/terminals.c
parentc961d8205b749d6df462202efd09efa6bf01442d (diff)
downloadgcc-0af66bdce078d022e19dae1c83dfa06f7f622648.zip
gcc-0af66bdce078d022e19dae1c83dfa06f7f622648.tar.gz
gcc-0af66bdce078d022e19dae1c83dfa06f7f622648.tar.bz2
[Ada] Spurious warning about a useless assignment
This patch removes a spurious warning about a useless assignment, when a composite object is the target of an assignment and is an actual for an out parameter in a subsewuent call, and there is an intervening use of the object as the prefix of a selected component in an intervening operation. 2019-07-22 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Selected_Component): If the prefix has a deferred reference, generate the correct reference now, to indicate that the previous assignment is used. This prevents spurious warnings on useless assignments when compiling with all warnings enabled. when there is a subsequent call in the same stqtement list, in which the prefix of the selected component is the actual for an out parameter. gcc/testsuite/ * gnat.dg/warn22.adb: New testcase. From-SVN: r273669
Diffstat (limited to 'gcc/ada/terminals.c')
0 files changed, 0 insertions, 0 deletions