#include <stdlib.h>
#include "check_debug.h"
struct foo {
int x, y, z;
int count;
char msg[0];
};
struct bar {
int x, y, z;
int count;
char msg[1];
};
struct outer1 {
int x, y, z;
struct foo foo;
};
struct outer2 {
int x, y, z;
struct bar bar;
};
int test(void)
{
struct foo *p;
struct bar *q;
struct outer1 *a;
struct outer2 *b;
p = malloc(sizeof(*p) + 100);
__smatch_buf_size(p->msg);
q = malloc(sizeof(*q) + 100);
__smatch_buf_size(q->msg);
a = malloc(sizeof(*a) + 100);
__smatch_buf_size(a->foo);
b = malloc(sizeof(*b) + 100);
__smatch_buf_size(b->bar);
}