Commit 9cd7bc5e by Ed Schonberg Committed by Pierre-Marie de Rodat

[Ada] Use common routine Expand_Nonbinary_Modular_Op for XOR expressions

2018-07-16  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_ch4.adb (Expand_N_Op_Xor): Use common routine
	Expand_Nonbinary_Modular_Op.  Needed for unnesting.

From-SVN: r262717
parent d2b73a3e
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_N_Op_Xor): Use common routine
Expand_Nonbinary_Modular_Op. Needed for unnesting.
2018-07-16 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Inherit_Predicate_Flags): A non-discrete type may have a
static predicate (for example True) but has no
static_discrete_predicate.
......
......@@ -4072,7 +4072,7 @@ package body Exp_Ch4 is
-- we avoid never-ending loops expanding them, and we also ensure
-- the back end never receives nonbinary modular type expressions.
if Nkind_In (Nkind (N), N_Op_And, N_Op_Or) then
if Nkind_In (Nkind (N), N_Op_And, N_Op_Or, N_Op_Xor) then
Set_Left_Opnd (Op_Expr,
Unchecked_Convert_To (Standard_Unsigned,
New_Copy_Tree (Left_Opnd (N))));
......@@ -10021,6 +10021,8 @@ package body Exp_Ch4 is
elsif Is_Intrinsic_Subprogram (Entity (N)) then
Expand_Intrinsic_Call (N, Entity (N));
end if;
Expand_Nonbinary_Modular_Op (N);
end Expand_N_Op_Xor;
----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment