On Mon, 17 Dec 2018 at 23:05, Iain Buclaw wrote: > > On Wed, 28 Nov 2018 at 23:46, Iain Buclaw wrote: > > > > On Wed, 28 Nov 2018 at 22:32, Johannes Pfau wrote: > > > > > > Next version, addresses the review comments. > > > > > > Tested at https://github.com/D-Programming-GDC/GDC/pull/768 > > > --- > > > gcc/d/ChangeLog: > > > > > > 2018-11-28 Johannes Pfau > > > > > > * expr.cc (ExprVisitor::visit(IdentityExp)): Add support for complex types. > > > (build_float_identity): New function. > > > > > > gcc/testsuite/ChangeLog: > > > > > > 2018-11-28 Johannes Pfau > > > > > > * gdc.dg/runnable.d: Test IdentityExp for complex types. > > > > > > > > > gcc/d/expr.cc | 40 ++++++++++++++++++++++++--------- > > > gcc/testsuite/gdc.dg/runnable.d | 22 ++++++++++++++++++ > > > 2 files changed, 51 insertions(+), 11 deletions(-) > > > > > > > As I've said before, looks reasonable to me. Thanks. > > > > I'll send a supplementary patch, and commit both together. > Committed to trunk along with patch that handles creal fields. Bootstrapped and regression tested on x86_64-linux-gnu. -- Iain --- gcc/d/ChangeLog: 2019-01-20 Iain Buclaw * d-codegen.cc (identity_compare_p): Return false if seen built-in type with padding. (build_float_identity): Moved here from expr.cc. (lower_struct_comparison): Handle real and complex types. * d-tree.h (build_float_identity): New. * expr.cc (build_float_identity): Move to d-codegen.cc. gcc/testsuite/ChangeLog: 2019-01-20 Iain Buclaw * gdc.dg/runnable.d: Add more tests for comparing complex types. ---