xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/PR15826.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -verify -emit-llvm-only %s -o %t
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc /* Testcase for PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout */
4*f4a2713aSLionel Sambuc struct sysctl_req {
5*f4a2713aSLionel Sambuc   struct aiocblist *p_aio;
6*f4a2713aSLionel Sambuc };
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc struct sysctl_oid {
9*f4a2713aSLionel Sambuc   int (*oid_handler)(struct sysctl_req *req);
10*f4a2713aSLionel Sambuc };
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc static struct sysctl_oid sysctl___kern_features_aio;
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc static void const *const __set_sysctl_set_sym_sysctl___kern_features_aio
15*f4a2713aSLionel Sambuc     __attribute__((__used__)) = &sysctl___kern_features_aio;
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc struct aiocblist {
18*f4a2713aSLionel Sambuc   struct aiocb uaiocb; // expected-error {{field has incomplete type}} expected-note {{forward declaration}}
19*f4a2713aSLionel Sambuc };
20