]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/20408 - unnecessary code for empty struct.
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 May 2019 21:39:08 +0000 (21:39 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 May 2019 21:39:08 +0000 (21:39 +0000)
commit0119795eb3af949303b4b6e37756a2926ae09229
treeda16d1ea2a867756a78e819cf1274de329d6c07b
parent0fd64d4bd7fcd89018f09d91698b1e9bea394f88
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@271523 138bc75d-0d04-0410-961f-82ee72b054a4
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]