[D] Fix identity comparison for structs with complex float fields.
authorIain Buclaw <ibuclaw@gdcproject.org>
Sun, 20 Jan 2019 12:55:38 +0000 (12:55 +0000)
committerIain Buclaw <ibuclaw@gcc.gnu.org>
Sun, 20 Jan 2019 12:55:38 +0000 (12:55 +0000)
commit5bdebb51a649d04569324f4f1124d5e64a3cbff7
tree420e7c58ae557015dac5d880c91f9f924489f3aa
parent70d87497e760dca94ef78e4e936f6d461f36e80d
[D] Fix identity comparison for structs with complex float fields.

gcc/d/ChangeLog:

2019-01-20  Iain Buclaw  <ibuclaw@gdcproject.org>

* 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  <ibuclaw@gdcproject.org>

* gdc.dg/runnable.d: Add more tests for comparing complex types.

From-SVN: r268104
gcc/d/ChangeLog
gcc/d/d-codegen.cc
gcc/d/d-tree.h
gcc/d/expr.cc
gcc/testsuite/ChangeLog
gcc/testsuite/gdc.dg/runnable.d