diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-07-16 14:11:20 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-16 14:11:20 +0000 |
commit | 9cd7bc5e000a2be07995aea4ff762f89c0e0661e (patch) | |
tree | 9e5b8cc7a29d89198e79904eca86458d827759ca /gcc | |
parent | d2b73a3edb85564fce73b916ad7f7c65ea3ef74d (diff) | |
download | gcc-9cd7bc5e000a2be07995aea4ff762f89c0e0661e.zip gcc-9cd7bc5e000a2be07995aea4ff762f89c0e0661e.tar.gz gcc-9cd7bc5e000a2be07995aea4ff762f89c0e0661e.tar.bz2 |
[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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cd1aac0..e75fcbb 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 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. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 222ca19..a98ffb3 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -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; ---------------------- |