]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Avoid expanding LHS assignments for controlled types
authorViljar Indus <indus@adacore.com>
Thu, 14 Nov 2024 13:22:44 +0000 (15:22 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 12 Dec 2024 09:57:54 +0000 (10:57 +0100)
commit9420666b5a93e510f2f10470a000fd5b4f9401aa
tree7ba51a4d2d628045830cb78a9a256acc32194266
parent03b642a45821c3077374db28ecc41fbbc058fa6f
ada: Avoid expanding LHS assignments for controlled types

Expanding a function call that returns a controlled type
on the left-hand side of an assignment should be avoided.
Otherwise we will miss the diagnostic for
trying to assign something to a non-variable element.

gcc/ada/ChangeLog:

* exp_ch6.adb (Expand_Ctrl_Function_Call): Avoid expansion
of controlled types when the LHS is a function call.
gcc/ada/exp_ch6.adb