struct-init: Fix zero initialization with multi-level designators
commitff998900b163e96c52a4fefc71736ed34626ed86
authorMichael Matz <matz@suse.de>
Sat, 6 May 2017 03:28:13 +0000 (6 05:28 +0200)
committerMichael Matz <matz@suse.de>
Sat, 6 May 2017 03:28:13 +0000 (6 05:28 +0200)
tree919db5e9a3647e1131ec7bdb4f9e3993f7e7e11a
parent075723456073bf7319805ce964a3f8a036eb7d27
struct-init: Fix zero initialization with multi-level designators

See the added testcase.  When one used designators like .a.x to initialize
sub-members of members, and didn't then initialize all of them the
required zero-initialization of the other sub-members wasn't done.
The fix also enables tiny code cleanups.
tccgen.c
tests/tests2/90_struct-init.c
tests/tests2/90_struct-init.expect