ada: Avoid temporary for conditional expression of discriminated record type
commite49eac82e805ede5dd9b3c5d4ae9f8d90b0cc034
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 6 Feb 2024 11:57:38 +0000 (6 12:57 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 21 May 2024 07:27:56 +0000 (21 09:27 +0200)
tree314aae31c0f351e97e7da178341a465b0304d17d
parent448157fbf9f2261ad1a2e98139603c002f86c7bf
ada: Avoid temporary for conditional expression of discriminated record type

This just aligns the definite case (discriminants with default) with the
indefinite case (discriminants without default), the latter case having
been properly handled for long.  In the former case, the maximum size is
used so a temporary can be much larger than the actual data it contains.

gcc/ada/

* gcc-interface/utils2.cc (build_cond_expr): Use the indirect path
for all types containing a placeholder.
gcc/ada/gcc-interface/utils2.cc