diff mbox series

[Ada] Expansion of discrete choices

Message ID 20180524130538.GA82214@adacore.com
State New
Headers show
Series [Ada] Expansion of discrete choices | expand

Commit Message

Pierre-Marie de Rodat May 24, 2018, 1:05 p.m. UTC
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.

Tested on x86_64-pc-linux-gnu, committed on trunk

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.
diff mbox series

Patch

--- gcc/ada/exp_util.adb
+++ 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;
 
    ------------------------------