r273336 - in /trunk/gcc: ada/ChangeLog ada/exp_...
pmderodat@gcc.gnu.org
pmderodat@gcc.gnu.org
Wed Jul 10 09:01:00 GMT 2019
Author: pmderodat
Date: Wed Jul 10 09:01:38 2019
New Revision: 273336
URL: https://gcc.gnu.org/viewcvs?rev=273336&root=gcc&view=rev
Log:
[Ada] Spurious error on case expression with limited result
This patch modifies the expansion of case expressions to prevent a
spurious error caused by the use of assignment statements to capture the
result of the case expression when the associated type is limited.
2019-07-10 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
assignments to the temporary result as being OK because the
expansion of case expressions is correct by construction.
(Is_Copy_Type): Update the predicate to match the comment
within.
gcc/testsuite/
* gnat.dg/limited2.adb, gnat.dg/limited2_pack_1.adb,
gnat.dg/limited2_pack_1.ads, gnat.dg/limited2_pack_2.adb,
gnat.dg/limited2_pack_2.ads: New testcase.
Added:
trunk/gcc/testsuite/gnat.dg/limited2.adb
trunk/gcc/testsuite/gnat.dg/limited2_pack_1.adb
trunk/gcc/testsuite/gnat.dg/limited2_pack_1.ads
trunk/gcc/testsuite/gnat.dg/limited2_pack_2.adb
trunk/gcc/testsuite/gnat.dg/limited2_pack_2.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_ch4.adb
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-cvs
mailing list