xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2007-09-17-WeakRef.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -O1 -emit-llvm %s -o - | grep icmp
2*f4a2713aSLionel Sambuc // PR1678
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc extern void B (void);
5*f4a2713aSLionel Sambuc static __typeof(B) A __attribute__ ((__weakref__("B")));
active(void)6*f4a2713aSLionel Sambuc int active (void)
7*f4a2713aSLionel Sambuc {
8*f4a2713aSLionel Sambuc   static void *const p = __extension__ (void *) &A;
9*f4a2713aSLionel Sambuc   return p != 0;
10*f4a2713aSLionel Sambuc }
11