diff options
author | Robert Dewar <dewar@adacore.com> | 2013-07-05 10:44:22 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-05 12:44:22 +0200 |
commit | 16788d44af6621f4bb0b51f3527a3e406cdfddca (patch) | |
tree | 5aab3f14ba85585fad33a1174cf7a4b84a38487d /gcc/ada/exp_ch4.adb | |
parent | da1b76c1656bca32734a9f38fb0d9a7e4b6eed71 (diff) | |
download | gcc-16788d44af6621f4bb0b51f3527a3e406cdfddca.zip gcc-16788d44af6621f4bb0b51f3527a3e406cdfddca.tar.gz gcc-16788d44af6621f4bb0b51f3527a3e406cdfddca.tar.bz2 |
exp_ch4.adb, [...]: Minor reformatting.
2013-07-05 Robert Dewar <dewar@adacore.com>
* exp_ch4.adb, a-cfdlli.ads, a-ngelfu.ads, s-bignum.adb: Minor
reformatting.
From-SVN: r200707
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index e8baffe..f4abc65 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -2587,6 +2587,8 @@ package body Exp_Ch4 is Full_Type := Underlying_Type (Full_Type); end if; + -- Case of array types + if Is_Array_Type (Full_Type) then -- If the operand is an elementary type other than a floating-point @@ -2609,6 +2611,8 @@ package body Exp_Ch4 is return Expand_Array_Equality (Nod, Lhs, Rhs, Bodies, Full_Type); end if; + -- Case of tagged record types + elsif Is_Tagged_Type (Full_Type) then -- Call the primitive operation "=" of this type @@ -2653,6 +2657,8 @@ package body Exp_Ch4 is (Unchecked_Convert_To (Etype (First_Formal (Eq_Op)), Lhs), Unchecked_Convert_To (Etype (First_Formal (Eq_Op)), Rhs))); + -- Case of untagged record types + elsif Is_Record_Type (Full_Type) then Eq_Op := TSS (Full_Type, TSS_Composite_Equality); @@ -2821,9 +2827,9 @@ package body Exp_Ch4 is return Expand_Record_Equality (Nod, Full_Type, Lhs, Rhs, Bodies); end if; - else - -- If not array or record type, it is predefined equality. + -- Non-composite types (always use predefined equality) + else return Make_Op_Eq (Loc, Left_Opnd => Lhs, Right_Opnd => Rhs); end if; end Expand_Composite_Equality; |