On Fri, Nov 10, 2023 at 12:17 PM Eric Botcazou <botca...@adacore.com> wrote: > > Hi, > > this teaches operand_compare to compare constant CONSTRUCTORs, which is quite > helpful for so-called fat pointers in Ada, i.e. objects that are semantically > pointers but are represented by structures made up of two pointers. This is > modeled on the implementation present in the ICF pass. > > Bootstrapped/regtested on x86-64/Linux, OK for the mainline?
OK. > > 2023-11-10 Eric Botcazou <ebotca...@adacore.com> > > * fold-const.cc (operand_compare::operand_equal_p) <CONSTRUCTOR>: > Deal with nonempty constant CONSTRUCTORs. > (operand_compare::hash_operand) <CONSTRUCTOR>: Hash DECL_FIELD_OFFSET > and DECL_FIELD_BIT_OFFSET for FIELD_DECLs. > > > 2023-11-10 Eric Botcazou <ebotca...@adacore.com> > > * gnat.dg/opt103.ads, gnat.dg/opt103.adb: New test. > > -- > Eric Botcazou