diff --git a/test/C++Frontend/global_ctor.cpp b/test/C++Frontend/global_ctor.cpp new file mode 100644 index 00000000000..ebca6b59a51 --- /dev/null +++ b/test/C++Frontend/global_ctor.cpp @@ -0,0 +1,11 @@ +int array[] = { 1, 2, 3, 4 }; + +struct foo { + foo() throw(); +} Constructor1; // Global with ctor to be called before main + +foo Constructor2; + +struct bar { + ~bar() throw(); +} Destructor1; // Global with dtor