re PR rtl-optimization/11059 (empty union optimization ice)
authorRoger Sayle <roger@eyesopen.com>
Mon, 7 Jul 2003 18:54:28 +0000 (18:54 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 7 Jul 2003 18:54:28 +0000 (18:54 +0000)
commit2c430630da43fd1908fcb6c4b57d0a5221c86261
tree6db930741a1591471ed698ee5312a1c604315210
parentcf633f5be8e81fa2314c0cdf74476dc5823e5df2
re PR rtl-optimization/11059 (empty union optimization ice)

PR optimization/11059
* expr.c (can_store_by_pieces): Return true if length is zero.
(store_by_pieces): If length is zero and endp is two, abort,
othwerise, if length is zero and endp is not two, return "to".
(clear_by_pieces): Do nothing if length is zero.
(clear_storage): Do nothing if length is zero.
(store_constructor): Simplify code when size is zero, or the
target has already been cleared.  This avoids emitting a
blockage instruction when initializing empty structures.

* g++.dg/opt/emptyunion.C: New testcase.

From-SVN: r69049
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/emptyunion.C [new file with mode: 0644]