xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/apple-kext-guard-variable.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang -target x86_64-apple-darwin10 -S -o %t.s -mkernel -Xclang -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // rdar://problem/9143356
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc int foo();
test()6*f4a2713aSLionel Sambuc void test() {
7*f4a2713aSLionel Sambuc   static int y = 0;
8*f4a2713aSLionel Sambuc   static int x = foo(); // expected-error {{this initialization requires a guard variable, which the kernel does not support}}
9*f4a2713aSLionel Sambuc }
10