1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -O1 -o - %s | grep icmp
2*f4a2713aSLionel Sambuc // PR1678
3*f4a2713aSLionel Sambuc extern void B (void);
4*f4a2713aSLionel Sambuc static __typeof(B) A __attribute__ ((__weakref__("B")));
active(void)5*f4a2713aSLionel Sambuc int active (void)
6*f4a2713aSLionel Sambuc {
7*f4a2713aSLionel Sambuc   static void *const p = __extension__ (void *) &A;
8*f4a2713aSLionel Sambuc   return p != 0;
9*f4a2713aSLionel Sambuc }
10