diff options
Diffstat (limited to 'clang/test/Sema/address-packed.c')
-rw-r--r-- | clang/test/Sema/address-packed.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Sema/address-packed.c b/clang/test/Sema/address-packed.c index 2799e19..b0519ba 100644 --- a/clang/test/Sema/address-packed.c +++ b/clang/test/Sema/address-packed.c @@ -329,3 +329,12 @@ void g13(void) { uint32_t *p32; p32 = &a[0].x; // no-warning } + +struct Invalid0 { + void *x; + struct fwd f; // expected-error {{incomplete type}} expected-note {{forward declaration}} +} __attribute__((packed)); + +void *g14(struct Invalid0 *ivl) { + return &(ivl->x); +} |