// RUN: %check %s

int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function

int main()
{
	void f() __attribute((constructor)); // CHECK: warning: constructor attribute on non-global function
}

// RUN: %check %s

int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function

struct Q {
	int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function
};

int main()
{
	void f() __attribute((constructor)); // CHECK: warning: constructor attribute on non-global function
}

Check ctor/dtor attribute on members
Check ctor/dtor attribute on members
