Add one more test

This commit is contained in:
christos 2014-11-20 20:52:15 +00:00
parent caa0961bff
commit e9101a47cf
2 changed files with 27 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.3 2014/04/17 18:34:44 christos Exp $
# $NetBSD: Makefile,v 1.4 2014/11/20 20:52:15 christos Exp $
NOMAN= # defined
@ -19,6 +19,7 @@ FILES+= d_c99_for_loops.c
FILES+= d_c99_func.c
FILES+= d_c99_recursive_init.c
FILES+= d_c99_struct_init.c
FILES+= d_c99_nested_struct.c
FILES+= d_c99_union_init1.c
FILES+= d_c99_union_init2.c
FILES+= d_c99_union_init3.c

View File

@ -0,0 +1,25 @@
/* C99 nested struct init with named and non-named initializers */
typedef struct pthread_mutex_t {
unsigned int ptm_magic;
char ptm_errorcheck;
char ptm_pad1[3];
char ptm_interlock;
char ptm_pad2[3];
volatile void * ptm_owner;
void * volatile ptm_waiters;
unsigned int ptm_recursed;
void *ptm_spare2;
} pthread_mutex_t;
struct arc4random_global {
pthread_mutex_t lock;
} arc4random_global = {
.lock = { 0x33330003, 0, { 0, 0, 0 }, 0, { 0, 0, 0 }, ((void *)0), ((void *)0), 0, ((void *)0) },
};