Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / meson-cc-tests / flexible-array-member-test.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include <stddef.h>
4
5 struct s { int n; double d[]; };
6
7 int main(void)
8 {
9   int m = getchar ();
10   struct s *p = malloc (offsetof (struct s, d)
11                         + m * sizeof (double));
12   p->d[0] = 0.0;
13   return p->d != (double *) NULL;
14 }