diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-30 09:15:45 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-09-30 13:45:33 -0400 |
| commit | 02a7055f72840f05dbf7530b2c82af46306ec0c2 (patch) | |
| tree | 746b6abb0f2e1d38085840c7004c36b060025b20 /validation | |
| parent | 304b6f7746b700fd1c553b3552b51d7d97bee206 (diff) | |
| download | sparse-dev-02a7055f72840f05dbf7530b2c82af46306ec0c2.tar.gz | |
[PATCH] fix duplicate initializer detection
bit_offset() doesn't deal with nested designators.
Fixed, testcase added.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/field-overlap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/validation/field-overlap.c b/validation/field-overlap.c new file mode 100644 index 00000000..8586c7ff --- /dev/null +++ b/validation/field-overlap.c @@ -0,0 +1,12 @@ +struct { + int x; + struct { + int z; + int w; + } y; +} a = { .y.z = 1, .y.w = 2, }; + +struct {int x, y, z;} w[2] = { + {.x = 1, .y = 2, .z = 3}, + {.x = 1, .y = 2, .z = 3} +}; |
