PR c++/20408 - unnecessary code for empty struct.
authorJason Merrill <jason@redhat.com>
Wed, 22 May 2019 21:39:08 +0000 (17:39 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 22 May 2019 21:39:08 +0000 (17:39 -0400)
commitc652ff83124334837dc16626f9e1040e4fe41fc9
treeda16d1ea2a867756a78e819cf1274de329d6c07b
parent52ea1caf28cdcdff8c9b2be844e3f1be6c369f16
PR c++/20408 - unnecessary code for empty struct.

Here initializing the argument from a TARGET_EXPR isn't an empty class
copy even though the type is !TREE_ADDRESSABLE, so we should check
simple_empty_class_p.

* call.c (build_call_a): Use simple_empty_class_p.

From-SVN: r271523
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-gimplify.c
gcc/cp/cp-tree.h
gcc/testsuite/g++.dg/tree-ssa/empty-3.C [new file with mode: 0644]