1 /* PR c++/57945 */
2 /* { dg-do compile } */
3 
4 extern int j;
5 static int i __attribute__((weakref("j")));
6 /* { dg-error "PTX does not support weak declarations" "" { target nvptx-*-* } .-1 } */
7 
8 int
foo(void)9 foo (void)
10 {
11   return &i ? i : 0;
12 }
13