diff options
-rw-r--r-- | test/C++Frontend/global_ctor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/C++Frontend/global_ctor.cpp b/test/C++Frontend/global_ctor.cpp new file mode 100644 index 0000000000..ebca6b59a5 --- /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 |