// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify -std=c++11 %s
// GCC will accept anything as the argument of weakref. Should we
// check for an existing decl?
static int ;
static int ;
static int a3 ;
static int a4 ;
// gcc rejects, clang accepts
static int a5 ;
// this is pointless, but accepted by gcc. We reject it.
static int a6 ; //expected-error {{weakref declaration of 'a6' must also have an alias attribute}}
// gcc warns, clang rejects
void
// both gcc and clang reject
;
int ; // expected-error {{weakref declaration must have internal linkage}}
int a8 ; // expected-error {{weakref declaration must have internal linkage}}
// gcc accepts this
int a9 ; // expected-error {{weakref declaration of 'a9' must also have an alias attribute}}
static int ;
int ;
static int v ; // expected-error {{'weakref' attribute requires a string}}
auto a11 = 1; // expected-error {{weakref declaration must have internal linkage}}