// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32
extern const int a;
const int a = 1; // expected-note 2 {{declared here}}
int b = 1; // expected-error {{'b' causes a section type conflict with 'a'}}
int c = 1;
__declspec int d = 1; // expected-error {{'d' causes a section type conflict with 'a'}}
__declspec int int_my_seg;
void
__declspec int int_bad_seg = 1; // expected-note {{declared here}}
void // expected-error {{'fn_bad_seg' causes a section type conflict with 'int_bad_seg'}}
// cl.exe doesn't warn on this, so match that.
// (Technically it ICEs on this particular example, but if it's on a class then
// it just doesn't warn.)
__declspec void
// This shouldn't warn; mingw users likely want to use
// __attribute__((section(".drective")))
// const char LinkerFlags[] = "-export:foo -export:bar";
// for interop with gcc.
int drectve_int;