diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-05-24 13:04:39 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-24 13:04:39 +0000 |
commit | ebea257ee1195ce196ed005a7ee3a4b9e84117fb (patch) | |
tree | 94986fe440f62a302f1b044bcd008b203214dcfa | |
parent | d72099ebf764ad96452153de8a77ab52d4731e18 (diff) | |
download | gcc-ebea257ee1195ce196ed005a7ee3a4b9e84117fb.zip gcc-ebea257ee1195ce196ed005a7ee3a4b9e84117fb.tar.gz gcc-ebea257ee1195ce196ed005a7ee3a4b9e84117fb.tar.bz2 |
[Ada] Expansion of discrete choices
This patch does some minor bookkeeping to avoid a potential double expansion
of discrete choices where at least one of them is a subtype with predicates.
No change in behavior, no need for a test.
2018-05-24 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the
construct with discrete choices no longer contains a subtype with
predicates since the expansion already handled this case.
From-SVN: r260646
-rw-r--r-- | gcc/ada/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c25e026..50c886d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,11 @@ 2018-05-24 Hristian Kirtchev <kirtchev@adacore.com> + * exp_util.adb (Expand_Static_Predicates_In_Choices): Indicate that the + construct with discrete choices no longer contains a subtype with + predicates since the expansion already handled this case. + +2018-05-24 Hristian Kirtchev <kirtchev@adacore.com> + * freeze.adb (Wrap_Imported_Subprogram): Generate an unchecked conversion to the return type to avoid a side effect where an imported relocated function generates a new anonymous access type, whose diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 5a8541d..2f3068d 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -4995,6 +4995,8 @@ package body Exp_Util is Choice := Next_C; end loop; + + Set_Has_SP_Choice (N, False); end Expand_Static_Predicates_In_Choices; ------------------------------ |