xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/struct-recursion.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // C99 6.7.2.3p11
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc // mutually recursive structs
6*f4a2713aSLionel Sambuc struct s1 { struct s2 *A; };
7*f4a2713aSLionel Sambuc struct s2 { struct s1 *B; };
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc // both types are complete now.
10*f4a2713aSLionel Sambuc struct s1 a;
11*f4a2713aSLionel Sambuc struct s2 b;
12