Sign in
skia
/
third_party
/
fontconfig
/
dba3287bf5dcb2ba0b716749a9a15e7ad43a91f4
/
.
/
meson-cc-tests
/
flexible-array-member-test.c
blob: 5f967567a5920fbec3445bed1a485a4fe4d6657d [
file
] [
log
] [
blame
]
#include
<stdlib.h>
#include
<stdio.h>
#include
<stddef.h>
struct
s
{
int
n
;
double
d
[];
};
int
main
(
void
)
{
int
m
=
getchar
();
struct
s
*
p
=
malloc
(
offsetof
(
struct
s
,
d
)
+
m
*
sizeof
(
double
));
p
->
d
[
0
]
=
0.0
;
return
p
->
d
!=
(
double
*)
NULL
;
}